Essentially, the headers and footers are only displaying on the first page and the first page after I manually break the page.
But header and footer are NOT being displayed on any additional pages that are a natural continuation due to long HTML content. (i.e. where there is no manual )
<htmlpageheader name="header">Page Hader</htmlpageheader>
<htmlpagefooter name="footer"><p>Copyright <b>blablabla</b> 1999 - <?php echo date('Y') ?></p></htmlpagefooter>
Header+footer will display on this page
<sethtmlpageheader name="header" page="all" value="on" show-this-page="1" />
<sethtmlpagefooter name="footer" page="all" value="on" />
<p>(PDF cover)</p>
<h1>Report</h1>
Header+footer will display on the first page but not on subsequent pages
<pagebreak />
<sethtmlpageheader name="header" page="all" value="on" show-this-page="1" />
<sethtmlpagefooter name="footer" page="all" value="on" />
LONG HTML CONTENT
THAT EXCEEDS PAGE SIZE
You can add @page like this:
@page {
header: header_name;
footer: footer_name;
}
Using @page
Headers & Footers
I hope that is useful
If you use @page in styles, Removing @page resolved the problem. That was what I had, and what worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With