Welcome Guest Search | Active Topics | Sign In | Register

Rotated Text does not align proper Options
LINQ IT
Posted: Friday, December 16, 2016 8:31:18 AM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2015
Posts: 42
I have HTML file that includes rotated text in table headers. When converting to PDF, the margins are not consistent with its HTML parent. I will email a sample project showing the discrepancy.

We are using version 16.2.93.0
eo_support
Posted: Friday, December 16, 2016 1:21:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

We have looked into this issue. The root of the problem is the window width. The HTML to PDF converter has a narrower "window" than on screen (because screen is horizontal and a PDF page is vertical). If you try to resize your browser window to a narrower width, you will see the same mis-align problem as in the PDF.

You have a number of options to resolve this issue:

1. Modify your HTML to align the text properly when the window has a narrower width;
2. Add something in the HTML to force a bigger width. For example, if you add the following to your HTML:

Code: HTML/ASPX
<div style="width:1500px;height:1px;"></div>


Then the HTML to PDF converter will detect it and set the window width to a minimumly at 1500px.

3. Set HtmlToPdf.Options.ZoomLevel to a value less than 1. Setting zoom level to less than 1 has the net effects of increasing the pixel width of the internal window. For example, you can set it to 0.5 to double the pixel width;

Hope this helps. Please feel free to let us know if you still have any questions.

Thanks!
LINQ IT
Posted: Friday, December 16, 2016 2:58:18 PM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2015
Posts: 42
Thank you, I didn't even consider that. Sometimes the answer is right in front of us. Have a great weekend!
eo_support
Posted: Friday, December 16, 2016 3:18:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
You are very welcome! Please feel free to let us know if there is anything else.


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.