How to render Visualforce page to PDF then Download it.

7. How to render Visualforce page to PDF then Download it.
1. You need to have two page first page is main page
 
<apex:page id="MainPage" showHeader="false" cache="true" contentType="application/x-pdf#PDF_Name.pdf"
<apex:include pageName="SecondpageName"/>
</apex:page>
2. your second page
 <apex:page renderAs="pdf" >//your code</apex:page>

Comments

Popular posts from this blog

Privacy Policy

Query in Loop problem: ( we do not need to to select query in loop )

How to set up vscode with salesforce sandbox