Below two functions in the Mpdf adding the header and footer in all the pages.
SetHTMLHeader() SetHTMLFooter()
But, anyone please help me to remove the header and footer from the first page of the pdf?
Here is a hack that works. Wrap your header/footer html in div with class with page number derived class like "page_{PAGENO}"
<div class='hide_first page_{PAGENO}'>{$header_html}</div>
Then have the following css
div.hide_first.page_1 {
display : none;
}
div.hide_first {
display : block;
}
mPDF has an option on this called "show-this-page" :
- Setting this to 0
would, i guess, not show it on the first page.
Have a look at the documentation: http://mpdf1.com/manual/index.php?tid=253
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