Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Render document html for PDF download View modes: 
User avatar
Member
Member
eric.savage-clyral - 11/6/2012 4:10:09 AM
   
Render document html for PDF download
I am implementing an option to download a page content as PDF. I can't see any documentation on how to do this, so my best attempt so far is to implement an MVC controller and return a FileContentResult, generating the PDF with Winnovative.

However, I'm trying to generate the html in the controller if I pass in a url as a parameter on the action. How can I do this? I get as far as retrieving the TreeNode, but I don't know what to do with it. Could you advise? And if there's a better way to achieve PDF rendering and download, perhaps you can point me in the right direction as I couldn't see documentation (we won't use the ABC pdf option).

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 11/8/2012 8:32:13 PM
   
RE:Render document html for PDF download
Hello,

The mentioned approach isn't feasible, since you would have to built the page dynamically from scratch beginning with the master page, inherited content, template, layout web parts and dynamic content based on e.g. the current user, culture... a much simpler approach is to fetch the HTML directly.

Best regards,
Boris Pocatko