0

I'm using the following code to add a header and footer on every page of my PDF:

global $pdf_footer;
global $pdf_header;

$mpdf->SetHTMLHeader('<img src="header.jpg"/>');
$mpdf->SetHTMLFooter('<img src="footer.jpg"/>');

This works great but i would like t remove the header and footer from the 1st and last page. Any suggestions? Thanks!

Darren
  • 9
  • 10
  • 1
    If you're using HTML check out this answer: https://stackoverflow.com/questions/24670208/mpdf-different-header-for-first-page Also, the docs have a nice guide on using different types of headers and footers and creating different ones for different first/last pages. – Aleksandar Bencun Nov 28 '17 at 12:08
  • Sorry, i'm new to SO. How do i mark your answer as perfect and give you credit? – Darren Nov 28 '17 at 13:46
  • And thank you for your help! – Darren Nov 28 '17 at 13:46
  • You can only upvote the comments, they can't be selected as answers. Only the full fledged answers can be accepted. Just upvote the answers on the question page that I've linked and that you've found helpful. Cheers! – Aleksandar Bencun Nov 29 '17 at 19:58

0 Answers0