+ Start a Discussion

Passing parameters from apex to page in PDF generation



I am calling a class from trigger and class has below statements.


PageReference pageref=new PageReference('https://test.abcd.xyz.force.com/abcd/apex/forcetest?id=xxxxxxxxxxxxxxx');
Blob b=pageref.getContentAsPDF();


and I have another page with name 'forcetest'. I am passing id from this class to 'forcetest' visual force page later i do renderas PDF. But when im doing this i could generate a pdf but not able to get the id in 'forcetest' page  related controller.


Any Idea!


Can you post the code for page and controller?