Posted by: Brian Chandler Dec 2 2021, 03:51 AM
How can I (reliably) put a page break in an html page? Here is what I have been using, which is also the only answer I can see given on the web:
CODE
<div style="page-break-before: always"></div>
But with the latest Firefox version it has simply stopped working. Then I find this: https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-before
... which says that "page-break-before" has been replaced by "break-before" (perhaps because it was not ambiguous enough?)
Reading the doc, it rambles about "generated box" or something similar - is this supposed to mean that it deliberately ignores a div put there for the purposes of a page break? If so I can program around it, I suppose.
I need this for printing forms - invoices and so on. I really must switch to generating a pdf, but I wonder if anyone has actual experience of the best tool for this purpose?