-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOMPDF and PAGE-BREAK-INSIDE #653
Comments
Which version of dompdf? Can you share a sample document? I tried something using the basic structure you outlined and didn't have any problems with the render. |
DOMPDF 0.6.0 beta 3 <div style="page-break-inside:avoid;">
<div class="title">title...</div>
<div class="text">
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
text...text...text...<br>text...text...text...<br>text...text...text...<br><br>text...text...text...<br>
</div>
</div> |
I'm not experiencing the same issue. Did you test on your server with the sample you provided? What version of PHP are you using? Sometimes that can affect how dompdf renders. You might try updating to the latest code by downloading from github or using the nightly downloader. |
5.4 version of php with codeigniter framework downloaded from github.com / dompdf / dompdf DOMPDF vercion 0.6.0 beta 3 |
It could be a PHP 5.4 problem. We haven't tested in that environment yet. I'll get back to you after testing with PHP 5.4. |
hello, probe the text in a different project today and it worked perfect, I think it must have something in my project maybe the CSS |
Hi, I solved was the footer and header #header {position: relative; left: 0px; right: 0px; font-size: 10px; color: # 888}
#footer {position: fixed; left: 0px; bottom:-180px; right: 0px; height: 150px; font-size: 12px; color: # 808080} them out and it works perfect. I now use a function of DOMPDF for the footer and header $pdf-> page_text ($ w - 60, $ h - 10, "{page_num} - {PAGE_COUNT}", $ font, 10, array (0.5,0.5,0.5)); thank you very much! |
There's definitely something buggy here. I'm not sure what the trigger is, but it looks like anything that causes the no-page content to flow to a new page breaks the render. We should keep this issue open until we've had a chance to look into it further. |
Hi, Is there a solution for this issue? I have a similar problem when multiple pages inside page-break-inside:avoid; basically my code is like the following.
Also, is there a way for dompdf to not render the part that exceed the section that exceeds the page break? For example if the aaaaaa... part is suppose to show on page 2, then we do not generated pdf for that. Only for the page that is contained on page 1. Thanks |
I'm seeing the same problem as tempe-goreng. Perhaps there is workaround to this problem, at least in my case – if I knew where the next block of text was going to be written (say a y-coordinate), I could programmatically determine if I wanted to add a page break before or not. Maybe there is a way to do this with DOMPDF? Not sure what the others' use cases are, and this should probably be fixed, but maybe this would solve the problem in the interim. Thanks! |
Hello All,
|
@sinothoma you're probably running into issue #98. |
I have this issue as well. Whenever I use Right now I'm forced to comment out the |
have you found a solution to this problem ? |
Looks like the particular issue outlined here has been addressed (tested in 0.8.3). @rick31 if you have a sample that doesn't work in the latest release of Dompdf feel free to follow up. |
@sinothoma Have you found a solution to this problem ? |
@parmarvishal21 Dompdf won't be able to handle that particular layout very well. The current code base does not support breaking an individual table cell/row across pages. The results you're getting are because Dompdf is trying to ensure that large table cell starts on a single page. Follow #98 for updates on this issue. |
Hi I need help, I have an HTML DIV that has several text as follows:
the problem is when the text very large, exceeding a page, blank pages are generated and the text is not complete.
How I can fix this?
from already thank you very much.
The text was updated successfully, but these errors were encountered: