function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RelaxItsJustCodeRelaxItsJustCode 

Creating PDF attachment ???? Please help...

Hi, I have to ask before I go too far down the wrong road here but:

 

Can Salesforce.com Apex create pdf's natively?

 

If not any suggestions on what I would need to easily create a PDF that could be used like a Proforma or Invoice?

 

Also, when I create the PDF needed any suggestions as to how best attach it to an email template?

 

Thank you,

Steve Laycock

Best Answer chosen by Admin (Salesforce Developers) 
gautam_singhgautam_singh

Hi ,


You can create PDF through Salesforce using the RenderAS Attribute. Use this in the <apex:page> attribute.

Check this amazing PDF Creation Blog from Jeff Douglas.


Also , You can create your own stylings in css file , store them in Static Resource and can refer them over the pdf generated . Check this blog for Presicse Details over Styling PDF

Also , You can easily Email attachments are Blob file types. To create an attachment, you need to use the ApexMessaging.EmailFileAttachment class. You must define both the file name and the content of an EmailFileAttachment object.Click here for more details.


Important :

Click on the Star Icon aside if this post provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You


 

All Answers

gautam_singhgautam_singh

Hi ,


You can create PDF through Salesforce using the RenderAS Attribute. Use this in the <apex:page> attribute.

Check this amazing PDF Creation Blog from Jeff Douglas.


Also , You can create your own stylings in css file , store them in Static Resource and can refer them over the pdf generated . Check this blog for Presicse Details over Styling PDF

Also , You can easily Email attachments are Blob file types. To create an attachment, you need to use the ApexMessaging.EmailFileAttachment class. You must define both the file name and the content of an EmailFileAttachment object.Click here for more details.


Important :

Click on the Star Icon aside if this post provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You


 

This was selected as the best answer
RelaxItsJustCodeRelaxItsJustCode
Thank you very much! I really appreciate it.

Steve