You need to sign in to do that
Don't have an account?
pdf to attachment - rendering wrong page
Hi All,
Hoping this is a quick one - has me puzzled, hoping for someone to clip me over the ear for some obvious thing Im missing...
Am on a VF page called 'selectpages' and can click 'render to pdf' button. Button action is intended to simply render another VF page to an attachment as follows -
Attachment ax = new attachment(name = filenameToUse, parentid = quot.id);
PageReference bl = Page.tc_report;
bl.getParameters().put('q',qid);
bl.setRedirect(true);
Blob b = bl.getContent();
ax.Body = b;
insert ax;
So why does the resulting attachment contain the 'selectpages' rendered nicely as a pdf and not the tc_report page?....
Weird! Any pointers appreciated.
Cheers,
CH