Welcome Guest Search | Active Topics | Sign In | Register

Object clipped with negative margin-left Options
Bouke
Posted: Wednesday, February 8, 2017 8:56:00 AM
Rank: Newbie
Groups: Member

Joined: 2/8/2017
Posts: 6
My document has margins defined of a few centimeters. For all normal content, this margin should apply. However theres a logo that I would like to pull left, so render within this margin. Using "margin-left:-1cm" I'm able to pull an image to the left and all is fine. However the logo I want to display is (inline) SVG. This element will get pulled to the left, but the portion inside the margin (1 cm) will be clipped.

For an example see here: http://imgur.com/a/n47Ve. I've replaced the SVG with text in this example. You can see the text being rendered, but the background of the div is clipped. The SVG has the same problem; the missing portion is roughly the same as the missing red background.

Another example with the SVG in place: http://imgur.com/a/ieJ0A. The logo is a circle, and now only ~40% of the circle is shown.

I'm using an old version of EO.pdf as we've got quite a lot templates that would require migration as well. DLL reports version 4.0.60.2.

Quote:
<div style="margin-left:-1cm;padding:.1cm;background-color: red">hello world</div>
eo_support
Posted: Wednesday, February 8, 2017 9:38:57 AM
Rank: Administration
Groups: Administration

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

Please check if the current version fixes the issue for you. Internally EO.Pdf uses a browser engine to render the HTML and your version uses a rather old WebKit based browser engine, there could be issues in that engine that have already been fixed over the years. The current version is based on Chromium V54 so it should produce quite consistent result as the regular Google Chrome browser.

If the problem still occurs with the current version, please try to isolate the problem into a test HTML and send the test HTML to us. See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

Note that the current version does not recognizes margins on the body element. This behavior is by design since the PDF page already have a fixed margin (which you can set through HtmlToPdf.Options.OutputArea). To avoid double margins, we only honor the margins set through HtmlToPdf.Options.OutputArea but explicitly ignores margins on the body element.

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.