views:

524

answers:

2

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

+1  A: 

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();
Brian Showalter
A: 

// set default header data $pdf->SetHeaderData('', PDF_HEADER_LOGO_WIDTH, 'marks', 'header string');

// set header and footer fonts $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));

With the help of above functions you can change header and footer.

kracekumar
Thanks for your belated answer. I had wanted to eliminate the Header/Footer, and Brian's way did it.
ChuckO