You need to sign in to do that
Don't have an account?

Include Page & parameter
Hi,
I can generate some PDF files from different records one by one but I want to generate them all from one button for example.
I was planning to create a Visual force page and add several include page like this:
<apex:include pageName="apex_PDF_generator?id=xxxxxxxxxxx1" rendered="true" />
<apex:include pageName="apex_PDF_generator?id=xxxxxxxxxxx2" rendered="true" />
<apex:include pageName="apex_PDF_generator?id=xxxxxxxxxxx3" rendered="true" />
<apex:include pageName="apex_PDF_generator?id=xxxxxxxxxxx4" rendered="true" />
But it is not working. It is really not possible to pass parameters to an include Page like ? Is there some workarounds or something ?
Thanks
In order to save the file as a pdf the page needs to redirect. One way i have found of getting around this is to use Salesforce Documents (although it won't be downloaded straight to your computer). To do this, create a new pagereference in your controller without redirecting, create a Document record, and set the Document body to the PDF using the "getContentAsPDF" function on the pagereference. I have done this for up to 50 PDFs at a time, but you do have to be aware of view state size limits.
All Answers
In order to save the file as a pdf the page needs to redirect. One way i have found of getting around this is to use Salesforce Documents (although it won't be downloaded straight to your computer). To do this, create a new pagereference in your controller without redirecting, create a Document record, and set the Document body to the PDF using the "getContentAsPDF" function on the pagereference. I have done this for up to 50 PDFs at a time, but you do have to be aware of view state size limits.
Thanks.