Forum Bugs

bottom border near the bottom of a page is rendered twice

dpirkle
We are currently using Prince 10 rev 4, and are evaluating an upgrade to v12. Testing revealed a problem, reproducible in 12.4 and 12.5, where the bottom border of a table cell, near the bottom of a page, is being rendered twice. There's a slight vertical offset between the two lines. I've attached an archive that has the html and a generated pdf.

The problem appears near the bottom of the first page of the PDF. You'll notice two horizontal lines, where there should only be one. With Prince 10, the PDF shows a single horizontal line. The subsequent text, starting with the word "Methods", appears at the top of the next page, without a second horizontal line. A screenshot comparison, Snip20190419_1.png, is also included in the archive. The output from v10 is on the left, and v12 is on the right.
  1. files.tar.gz1.6 MB
mikeday
The issue is caused by us changing the default value of the widows/orphans properties from 2 to 1. This was intended to give more predictable results and improve compatibility with web browsers, but in this particular case it allows one line from the next section to be placed on the first page, since it fits there.

You can get the old behaviour back with this CSS rule:
body { widows: 2; orphans: 2 }

Note that this will still allow the next section to begin without a page break if there is enough space left on the page to fit at least two lines.
dpirkle
Thanks for the info, I'll give your suggestion a shot. I'd like to point out, though, that a single border is being rendered two times, so it definitely looks like a bug to me.
mikeday
If the table is split over two pages then its bottom border will be repeated on each page unless explicitly disabled with "box-decoration-break: slice".
dpirkle
Well, the table with the bottom border is not split over two pages, it is completely contained within one page. There is a table with a bottom border, followed by another table. The border for the first table is rendered twice: once at the bottom of the table, at the page bottom, where one would it expect. Then it appears a second time, following the first line of the second table. The second border is appearing in a completely different table, which follows the table where the border actually applies.

Thanks for the workaround though: I tried it out, and the second border doesn't appear. I would feel even better if you'd fix the bug!

Edited by dpirkle

mikeday
When the "Methods" appears on the first page it is contained with a table with a bottom border that is split over two pages.
dpirkle
Ok, sorry, now I understand. The second border is the bottom border of the second table not the first one.