Welcome Guest Search | Active Topics | Sign In | Register

"page-break-after/before: avoid" stopped working in eo.pdf Options
vmykhalchuk
Posted: Thursday, August 1, 2019 3:31:15 AM
Rank: Member
Groups: Member

Joined: 3/6/2019
Posts: 12
Hello,

page-break-after: avoid and page-break-before: avoid stopped working for us after we upgraded the eo.pdf library from 19.1.40 to 19.1.95.

Can you please check into this issue?
Let me know if you need any additional input on this.
eo_support
Posted: Thursday, August 1, 2019 8:32:33 PM
Rank: Administration
Groups: Administration

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

We are not aware of this problem. Can you send a test HTML file to us? See here for more details:

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

Thanks!
vmykhalchuk
Posted: Friday, August 2, 2019 3:47:51 AM
Rank: Member
Groups: Member

Joined: 3/6/2019
Posts: 12
Hi,

Please find the code below for page-break-after.

The div with NO BREAK AFTER text should have gone to the next page with the table, but it did not.

Code: HTML/ASPX
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Table</title>
</head>
<style>
    .all-breaks-avoid {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    .avoid-break-inside {
        page-break-inside: avoid;
    }

    table {
        border-collapse: collapse;
    }

    tr, td {
        border: 1px solid grey;
        height: 50pt;
        padding: 10pt;
    }
</style>
<body style="width: 500pt;">
    <div>
        <h3>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</h3>
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    </div>
<div class="all-breaks-avoid">
    <h3>NO BREAK AFTER</h3>
</div>
    <table class="avoid-break-inside" style="width: 500pt; margin: 0 auto;">
        <thead>
            <tr><td>Cell 1</td><td>Cell 2</td></tr>
        </thead>
        <tbody>
	<tr><td>Cell 3</td><td>Cell 4</td></tr>
	<tr><td>Cell 3</td><td>Cell 4</td></tr>
        <tr><td>Cell 3</td><td>Cell 4</td></tr>
        <tr><td>Cell 5</td><td>Cell 6</td></tr>
        <tr><td>Cell 7</td><td>Cell 8</td></tr>
        <tr><td>Cell 9</td><td>Cell 10</td></tr>
        <tr><td>Cell 11</td><td>Cell 12</td></tr>
        <tr><td>Cell 13</td><td>Cell 14</td></tr>
        <tr><td>Cell 15</td><td>Cell 16</td></tr>
        <tr><td>Cell 7</td><td>Cell 8</td></tr>
        <tr><td>Cell 9</td><td>Cell 10</td></tr>
        </tbody>
    </table>
</body>
</html>


To reproduce the issue with page-break-before you need to change 3 things:
1. change class all-breaks-avoid to be
Code: CSS
.all-breaks-avoid {
        page-break-before: avoid;
        page-break-inside: avoid;
    }

2. remove class from div with NO BREAK AFTER
3. change class on table from avoid-break-inside to all-breaks-avoid

Please let me know if you were able to reproduce the issue.

Thanks!
vmykhalchuk
Posted: Friday, August 2, 2019 5:21:14 AM
Rank: Member
Groups: Member

Joined: 3/6/2019
Posts: 12
Also, sorry, I gave you misleading information - apparently this issue started to reproduce earlier, when we updated from eo.pdf version 18.3.46.

I double checked and provided HTML works as expected on that older version (18.3.46), and page-break-after does not work on the most recent one (19.2.11)
eo_support
Posted: Monday, August 5, 2019 11:22:49 AM
Rank: Administration
Groups: Administration

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

This is just to let you know that we have found the root of the problem. This issue will be resolved in our next build. We will reply here again as soon as the new build is available.

Thanks!
eo_support
Posted: Friday, August 9, 2019 9:55:20 AM
Rank: Administration
Groups: Administration

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

This is just to let you know that we have posted a new build that should fix this problem. You can download the new build from our download page. Please take a look and let us know how it goes.

Thanks!
vmykhalchuk
Posted: Tuesday, August 20, 2019 4:53:07 AM
Rank: Member
Groups: Member

Joined: 3/6/2019
Posts: 12
Hello,

We have updated the library and now page-break functionality works as expected.

Thank you!
eo_support
Posted: Tuesday, August 20, 2019 1:06:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Great. Thanks for confirming the fix!


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.