Open MarcDuevel opened 4 years ago
Hopefully someone has an idea what I can do about it
You can't do nothing about it. See #36.
WeasyPrint is unable to paginate/split rows which cross the page margin. When it encounters such a row it tries to move it onto the next page. If that isn't possible, it gives up and restricts the cells involved to the current page.
Most of the time these cut-offs pass unnoticed. In your case the background-color disclosed the shortcoming.
Failing row-splitting/cell-elongation manifests itself in two ways:
The overlapping cell height is calculated correctly but the overlapping part of the cell is drawn in the page margins -- that's the green cell in your screenshot.
The height calculation is going down the drain and the cell height collapses to the height of its content -- that's the yellow cell in the screenshot.
And no, break-inside
, orphans
and widows
doesn't help.
is there any way to add a bottom-border to the last row of the table on a page and rerender the text inside on the next page again?
What about <tfoot>
?
I've got a really weird problem with the background-color of an
<td>
element that has a page-break inside their rowspan. As you can see in the screenshots it should render the background-color on both pages, it just doesn't do it.Also weird is that it seems to be handled diffently in some cases, not sure what the difference between this two shown behaviors is. I'll add the html-template file and css used to generate the table and also the html for this specific table in the screenshot at the end.
Hopefully someone has an idea what I can do about it, I'm really stuck right now.
And another question: is there any way to add a bottom-border to the last row of the table on a page and rerender the text inside on the next page again?
Before someone mentions the
page-break-inside: avoid
-attribute, I'm familiar with that, the problem is it can't help me, because some of the sections in this table are way bigger than one page (maybe not with this data but it is possible and does happen) so I just can't keep the sections together and break afterwards.Appreciate every comment that could help me!
CSS:
Table-Template-File:
Table-HTML-Outcome: (Yeah it's a pretty big table...)