Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

EOPDF header font issue Options
Balu Delhi
Posted: Wednesday, January 9, 2019 10:00:58 AM
Rank: Newbie
Groups: Member

Joined: 12/18/2018
Posts: 3
Here is simple content I am using to set to header content.

HtmlToPdf.Options.HeaderHtmlFormat = "<span style="font-family: arial; font-size: 45px; font-weight: bold;border:red 1px solid;">Test Report</span>";

PDF is getting generated with different fonts based on the body content font. I generated two different contents one has generated with header with 24.5 px and another one with 26 px.

Please suggest, is there any way to generate based on the input font in header.
eo_support
Posted: Wednesday, January 9, 2019 12:42:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,360
Hi,

This behavior is by design. The reason is the header/footer would use the same zoom level as the main contents so that it can be consistent with the main contents (for example, text with font-size:45px in the header/footer would be displayed the same size as text with font-size:45px in the main contents). This means if you have multiple conversions that uses different zoom level (which is very common because by default the zoom level is automatically adjusted), then header footer would have different sizes. If this is not the desired result, you can either explicitly fix the zoom level or use a separate HtmlToPdf.ConvertHtml to stamp the header/footer after the conversion. You can find more information about zoom level here:

https://www.essentialobjects.com/doc/pdf/htmltopdf/auto_fit.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.