[Html2PdfConverter] HTMLTOPDFConverter

Forge Component
(64)
Published on 17 May by Guilherme Pereira
64 votes
Published on 17 May by Guilherme Pereira

Hi Im trying to convert a form with a generated qr code into a downloadable pdf format ( please see attached image)but im having an error( please see attached image)


can anyone help? thanks

error when opening the pdf.

Hi justin,


The pdf is correctly generated but your page is failing. It’s probably something with your code rather than the component.

Have you checked the error log in Service Center? What does it show?

Is your page anonymous? If not it must be.

If the page is anonymous just go in debug mode and check the url for which you’re trying to generate the pdf, then open a new anonymous session in your browser and paste it. Do you gave the same error?


Cheers,

Guilherme

Guilherme Pereira wrote:

Hi justin,


The pdf is correctly generated but your page is failing. It’s probably something with your code rather than the component.

Have you checked the error log in Service Center? What does it show?

Is your page anonymous? If not it must be.

If the page is anonymous just go in debug mode and check the url for which you’re trying to generate the pdf, then open a new anonymous session in your browser and paste it. Do you gave the same error?


Cheers,

Guilherme

here's the error message from service center.



the page is set to anonymous and public already. but the same error still occurs. 


Hi,


Your page is failing on a GetUser query. Your probably using the GetUserId but the pdf is generated in a different request/session (hence the need to be anonymous) and there’s no user in session.


You should follow the approach i mentioned earlier by trying to access the page in an anonymous browser until you are able to have it render properly.


Cheers,

Guilherme