TCPDF: How to print a Page with no Header or Footer

TCPDF: How to print a Page with no Header or Footer

Last updated:

There's a StackOverflow question on this topic but what they suggested didn't seem to work for me.

What did work for me was this:

<?php
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
$pdf->AddPage();
$pdf->setPrintHeader();
$pdf->AddPage();
$pdf->setPrintFooter();
$pdf->AddPage();
$pdf->AddPage();
$pdf->Output('first_page_with_no_headers_or_footers', "I");

The first page has no footer or header, but the following pages do. That's common when you want to, for instance, make a cover page for a document.

Dialogue & Discussion