[Ultimate PDF] Ultimate PDF: Possible to print dynamic pages?

Forge Component
(8)
Published on 1 Nov (3 weeks ago) by leonardo.fernandes
8 votes
Published on 1 Nov (3 weeks ago) by leonardo.fernandes

Hi,

I am wondering if it is possible to download a PDF of a page that still needs to be rendered with the specific data of that screen. 

For example:
I am filling in a questionnaire and at the end I want to have the possibility to print the results to pdf. 

Question:
Do I first need to lead the user to the results page and then give the opportunity to download the page to pdf or is it possible to download the page without going to the result page (if not, is there a way to do it under the hood?)? 

I know I can fill in a URL, but a result page should be rendered with the outcomes of that certain questionnaire. So it is depending on several input parameters of that specific questionnaire. 

Regards,

Hello Martijn.

Your questionnaires should probaly have an Id on the database. You can store all outcomes of the questionnaire in the database, so that your PDF screen only needs to have the questionnaire Id as input parameter, and can read all information necessary for the PDF from the database.

You can use the ScreenToPDF web block to transform your screen into a PDF, and in that case you only need to redirect to that screen in order to trigger the PDF render and download. You can see an example of how to use that in the sample application, which you can download from the forge website: https://www.outsystems.com/forge/component-overview/5641/ultimate-pdf.