[Html2PdfConverter] [Html2PdfConverter] header not working on multiple pages document with margins
Forge component by Miguel 'Kelter' Antunes

Hi Everybody, 


I am using the Html2PdfConverter (Version Version 1.1.14  for OutSystems 10) but whenever the document has several pages, more than two, the header (composed by a logo and two labels) stops to working correctly, that is, it only appears in some pages and not always in the correct way (you can see on the print screen what i mean).


This only happens when we parameterize the margins, otherwise the header works well. The problem is that we need to use the margins ... L 20 R 20 T 55 B30


We have already tested with several values in the margins but we get always the same result.


This is the header that i'm using (only have the logo and two labels that are set with the inputs)


These are the parameters that I am using

--encoding utf-8 -L 20 -R 20 -T 55 -B 30 --header-html https://LinkToServer/Header.aspx?TitleText=First%20Header&Title2Text=Second%20Header --footer-spacing 20 --footer-left Footer%20Text


Here is an example of the result and as you can see, the header does not work correctly.


Any ideas / suggestions in fixing this.



Thanks.

Solution

Hi Pedro,

It's possible that you need to give more time for the header to load. This is especially the case with Reactive Web applications which depend on the OnRender event. You can use --javascript-delay 1000 and adjust the number of milliseconds download until it loads without error. Can you give that a try?

Since you are using OS10 and Traditional Web, it could still be that the the header needs a few seconds to load. It will depend a lot on the server and network capacity.

Thank you,

Anthony

Thanks Anthony, it's working fine now!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.