Showing posts with label generate PDF file. Show all posts
Showing posts with label generate PDF file. Show all posts

Wednesday, 21 October 2015

Render Visualforce as PDF

·         Render Visualforce as PDF

·         You simply need add one more parameter in your <apex:page> tag i.e. “rederAs=PDF” , Like shown below :

<apex:page renderAs = "pdf"> 
                       </apex:page>


·         Go through following some more useful documents for more detailed info :





* Check out Another useful post of Rendering PDF with Name & Extension here 

Setting Extension and Name of PDF File rendered using Visualforce

  •          Unfortunately this is directly not supported in tag in Visualforce.

  •          You can do that by using following code :  

Apexpages.currentPage().getHeaders().put('content-disposition', 'attachment; filename=AccountReport.pdf');

Thank you ! :)