Welcome Guest Search | Active Topics | Sign In | Register

Changes between 16.2.23 & 16.2.37 Affect PDF Generation on Server Options
LINQ IT
Posted: Friday, October 21, 2016 12:20:40 AM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2015
Posts: 42
When generating PDF's, the width and layout changes substantially between these two versions.

I cannot reproduce the issue on a sample project so I'm wondering if it has something to do with being run under IIS vs a Console Application. I will send a test project and outputs for review.
eo_support
Posted: Friday, October 21, 2016 8:24:58 AM
Rank: Administration
Groups: Administration

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

We have tried 16.2.44 with your test project and it actually works fine.

There has indeed been a change since 16.2.37 regarding how to treat margin right. Consider the following HTML:

Code: HTML/ASPX
<body style="margin-right:200px;">
    <div style="width:1000px;margin-left:100px;margin-right:100px;">some contents</div>
</body>


The rules are:

1. Margin right on the body element is always ignored since the page margins is already set through HtmlToPdfOptions.PageArea;
2. Before 16.2.37, the right margin on the inner DIV is also ignored, reason being that it only contribute blank space on the right;
3. From 16.2.37, the right margin is NO longer ignored. The reason is the designed intention for the above HTML could be that user wants the DIV to align to the middle (with equal left and right margin), since we must take the left margin (otherwise it will be misaligned with other elements), we decided to take right margin as well;

So you may want to check your right margin settings in your page and clear them if needed.

Thanks!

LINQ IT
Posted: Wednesday, November 9, 2016 2:03:32 PM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2015
Posts: 42
We've spent substantial time going through all our HTML and didn't find the issues you're referring to.

We've now upgraded to version 16.2.60 in our test environment, and it appears reports are rendering proper again. Can you explain any changes, specifically, Fixed HTML to PDF sometimes render page with inconsistent layout issue.

Why would the same HTML conversion to 16.2.37 change when moving to version 16.2.44, and now look proper again in 16.2.60? Is there an upcoming change we should be aware of.
eo_support
Posted: Wednesday, November 9, 2016 10:15:28 PM
Rank: Administration
Groups: Administration

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

As far as we know, build 16.2.60 did not undo changes made in build 16.2.44. So the change as explained in our previous reply still apply to build 16.2.60.

Build 16.2.60 did increased the waiting time that allows the browser engine to properly layout the contents. Previously the conversion can start too soon (disregard of HtmlToPdfOptions.MinLoadWaitTime value) that can capture the output when the layout is not yet completed yet. However this is a totally different issue than the change made in 16.2.44.

If you still have any problems, please send us a test case and we will be happy to investigate further.

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.