Html2PDFConverter: Unable to get pdf of page within application

Html2PDFConverter: Unable to get pdf of page within application

  

Hello All, 

I am using Html2PdfConverter component in order to fullfill requirement to get table list data converted in pdf format. 

Just to get started i m giving one of the page url of my authenticated application. Problem is i m able generate pdf but as a pdf output is internal error page is converting to pdf.

I have tried in personal environment giving url of an anonymous page it converts the page into pdf but this is not happening for my applications pages. 


pls help. TIA

Hi Nitesh, 

As you already stated, the url of the pdf must refence a page that is accessible for anonymous users. Also make sure that the page doesn't use components/widgets that rely on session data or require a user to be logged in. 

If that doesn't solve the issue, you can check what the real error message is in Service Center.


Regards,

Lennart 

Lennart Kraak wrote:

Hi Nitesh, 

As you already stated, the url of the pdf must refence a page that is accessible for anonymous users. Also make sure that the page doesn't use components/widgets that rely on session data or require a user to be logged in. 

If that doesn't solve the issue, you can check what the real error message is in Service Center.


Regards,

Lennart 

Hi Lennart,

Thanks for the reply , my problem area is, as to export a grid in PDF with all its data, i have populated it on an standalone page with anonymous role but how we can generate PDF if i have to use session variable as it requires some session variables to get it populated. I am attaching the pdf which i m getting currently.  


Hi Nitesh,

Html2Pdf is an external toolkit that request directly to server the url you put in the parameters and "print" it into a pdf. This call should be anonymous because this request could not log users and it has no session available.

If you need to send some parameters to your reports the solution is providing a temporary table. Let me try to explain step by step:

1. From the screen where you want to call report. Save into this temporary entity all parameters you need to your report and pass only the id to your ReportScreen. 

2. In ReportScreen, do an aggregate to this temporary entity and just after that delete the record.

3. Use this data to display your report.


Best regards

Fabio Fantato