|
Rank: Newbie Groups: Member
Joined: 9/30/2013 Posts: 1
|
Hello, we are experiencing a problem with eo pdf dll version 3.0.24.2.
Images are split between pages although page-break-inside is set to avoid for images and even the surrounding divs.
The Pdf is created via HtmlToPdf.ConvertUrl.
Please tell me if you need further information.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
You have a very old version. Please try the current version first. If the problem still occurs in the current version, you can try to isolate the problem into a test HTML snipet and then post the test HTML. Once we have that we will try it here and tell you what we can find.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 10/17/2013 Posts: 22
|
Hi,
I have the same problem, using your demo with EO.Pdf.dll version 5.0.29.2
Is there an API to prevent it?
Couldn't find a way to attache the html here...
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi Joseph,
The original problem was fixed a long time ago. So what you have might be a new problem. Your version is relatively new but is still a few month behind. So try to download the latest build first, and if problem still occurs, try to remove code block by block from your HTML file to see what triggered the problem. Usually it has to do with your HTML file. For example, if you have a table with two columns, one column with a image that has "page-break-inside:void", another column has two paragraphs of text with "page-break-after:always", then obviously one of them will win and another one will be disregarded.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 10/17/2013 Posts: 22
|
Hi,
I downloaded and testes the latest version - 5.0.48.2, and the images still split between pages.
I also tried to change any "page-break-before" and "page-break inside" from "always" or "auto" to "avoid", and it didn't solved the problem.
Removing HTML blocks might simply hide the problem instead of solving it, as the image location might change to the page center.
How can I solve it?
Thanks,
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi Joseph,
You will want to check your HTML. For example, to comment out our HTML content block by block to find the offending block. If there is no conflicting contents or the image can be fit in a single page (the image is not bigger than one page), "page-break-inside:void" should work. You should be able to verify this very easily with a simple HTML file with some text and an image.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 10/17/2013 Posts: 22
|
Adding -
img { page-break-inside: avoid; }
to the XSL which formats the html file, solved my problem. (avoid, not void)
Thanks for your help
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Yes. You are correct. It should be "avoid", not "void". Thank you very much for pointing that out and glad to hear that it's working for you.
Thanks!
|
|