We are using a <div> to append a signature block and keep it on the same page with the last paragraph in our file.
So (briefly, full sample attached):
For p tags we are using: (line 77 in sample.html)
widow: 3;
orphans: 2;
and we have added a rule to the signature block:
p + .signature-block
page-break-before: avoid
With a significantly long paragraph, what I expect to happen is for the long paragraph to be split between two pages as it has way more than 5 (3 widow, 2 orphan) lines, and the signature block to be on the same page as the second half of that long paragraph.
That widow/orphan control works just fine before we add a rule to prevent page break before a signature block. Once this 'page-break-before: avoid' is in there, the entire (long) paragraph is pulled to the next page along with the signature.
Attached is the base html file (sample.html), a css file we pass to prince (print_specific.css) and the output pdf file (sample.pdf).
Any thoughts on what may be happening here?
So (briefly, full sample attached):
<p>
Short paragraph.
</p>
<p>
Long Paragraph.
</p>
<div class='signature-block-container'>
Signed by Joe Smith
</div>
For p tags we are using: (line 77 in sample.html)
widow: 3;
orphans: 2;
and we have added a rule to the signature block:
p + .signature-block
page-break-before: avoid
With a significantly long paragraph, what I expect to happen is for the long paragraph to be split between two pages as it has way more than 5 (3 widow, 2 orphan) lines, and the signature block to be on the same page as the second half of that long paragraph.
That widow/orphan control works just fine before we add a rule to prevent page break before a signature block. Once this 'page-break-before: avoid' is in there, the entire (long) paragraph is pulled to the next page along with the signature.
Attached is the base html file (sample.html), a css file we pass to prince (print_specific.css) and the output pdf file (sample.pdf).
Any thoughts on what may be happening here?