Changing or eliminating Header & Footer in TCPDF

ChuckO picture ChuckO · Feb 7, 2010 · Viewed 51.3k times · Source

AddPage() in tcpdf automatically calls Header and Footer. How do I eliminate/override this?

Answer

Brian Showalter picture Brian Showalter · Feb 7, 2010

Use the SetPrintHeader(false) and SetPrintFooter(false) methods before calling AddPage(). Like this:

$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'LETTER', true, 'UTF-8', false);
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
$pdf->AddPage();