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
Prathap I am :)Prathap I am :) 

Can we able to send visualforce PDF from salesforce using REST API ???

Hi,

Can we able to send visualforce PDF from salesforce using REST API ???
Cory CowgillCory Cowgill
No you will not be able to properly render a VF PDF Page via a REST API. You can get the VF PDF to render in a trigger and you may be able to get it to render in the REST API, however the formatting and rendering will not be correct. Also access to images and other items will not be pulled into the PDF. You can see my trigger pdf example here: http://corycowgill.blogspot.com/2012/02/generating-pdf-in-apex-trigger.html which may help you to generate a PDF but as I said, the images and other artifacts won't render. So buyer beware. :)
Prathap I am :)Prathap I am :)
Hi Cory Cowgill ,
Thanks For your Reply.

Can we send PDF which is  either an attachment to a record or a document from Salesforce using REST API .

If yes can you share sample code with me .

Thnks for your help & time