[Html2PdfConverter] Unable to download pdf with css parameters {HTML2PDFConverter}
Forge component by Miguel 'Kelter' Antunes
Published on 02 Jun 2020

I am trying to create an image using HTML2PDF Converter with a different font family.
I am using the method GenerateImage.
Am able to see the css changes on the page in code, but when i embed this image in a pdf and download it, the css changes are not shown.
Any suggestion how to resolve this?
My required flow is as below:
1. Take user input in an input box
2. Give this user input a different font family css
3. Convert this input as an image
4. Embed this image in a PDF and download it with the css.
My approach:
I tried to create a new page with the input parameter of the user input text. Defined the CSS classes and font family on this page for the input (which showed correct on the page) and gave this pages URL as an input to the  GenerateImage method on my parent page.
Still this image here is not taking the CSS i gave to it.
Am I missing something?
Please help.


Is there security on the URL being called? The HTML2PDF call is done by executing an external application that does not have any of your user security context so both the page being called and any other URL being accessed by that page need to have full anonymous access enabled otherwise it will get a security violation. 

Also if you are using a multi tenant application and accessing an entity then it will do the call using the "Users" tenant instead of the one the user is logged in as on the front end. If you are using multi tenant you will probably need to call the TenantSwitch action.

Rank: #2489

Hello John,

Thank You for replying. But its none of the two scenarios you mentioned.
The URL page is completely anonymous. Also the application is not multi tenant.

Anagha Chikate