Page-break-inside on tables

25 views
Skip to first unread message

Ville Vartiainen

unread,
Jun 2, 2011, 9:32:37 AM6/2/11
to dompdf-dev
Hi,

I'm getting weird behaviour when using the page-break-inside:avoid
property to prevent, for example, tables breaking over two pages. It's
causing some random behaviour like changing the colour of the pager
number, and then creating unnecessary page breaks in some instances in
paragraph text and lists.

Is this a known issue, or do I need to go over my templates for PDF
output again?

Thanks,

v

BrianS

unread,
Jun 3, 2011, 3:14:15 PM6/3/11
to dompd...@googlegroups.com
The color-changing behavior may be something we've seen before and will address for the 0.6.0 final.

I'm not sure we've seen the specific page-breaking issue, do you have a sample document?

(Note: posts such as this would be more appropriate for the support forum)

Ville Vartiainen

unread,
Jun 7, 2011, 7:25:51 AM6/7/11
to dompdf-dev
Sorry I can't send the material over :(

But basically using the page-break-inside on the table element causes
odd page breaks in some instances, particularly the table might carry
a paragraph or ist that is immediately above it onto the next page
(when the p or ul could have stayed on the previous page).

V
> (Note: posts such as this would be more appropriate for the support forum<https://groups.google.com/forum/#%21forum/dompdf>
> )

BrianS

unread,
Jun 7, 2011, 1:15:25 PM6/7/11
to dompd...@googlegroups.com
On Tuesday, June 7, 2011 7:25:51 AM UTC-4, Ville Vartiainen wrote:
Sorry I can't send the material over :(

That's ok, it helps, but your description is probably sufficient.
 
But basically using the page-break-inside on the table element causes
odd page breaks in some instances, particularly the table might carry
a paragraph or ist that is immediately above it onto the next page
(when the p or ul could have stayed on the previous page).

V

Is this a sample of what you're referring to as far as the table pulling the previous block element with it? Definitely buggy behavior and something we'll try to address for the final 0.6.0 release.

I believe you can quickly work around this particular issue by surrounding your table with a div.

Reply all
Reply to author
Forward
0 new messages