Is it possible to add a new page in DOMpdf? Similar to mPDF AddPage(); functionaly. I can't seem to find anything in the documentation, is there any work around to this?
I can't seem to find anything in the documentation.
Is it possible to add a new page in DOMpdf? Similar to mPDF AddPage(); functionaly. I can't seem to find anything in the documentation, is there any work around to this?
I can't seem to find anything in the documentation.
dompdf takes care of paging automagically. If you want to force a page break you can do so by styling an element with
page-break-before: always;
orpage-break-after: always;
.If the other answer doesn't work for you (as it is for me), you can add a CSS class :
and encapsulate every "page" in an element with this class. Not the prettiest way, but it does the job.
All answers presented here will make DomPDF to add a blank page to the end of the PDF file. Here is how to fix that:
CSS:
HTML:
Just an example for BrianS's answer:
CSS
HTML