Asked 7 years ago
21 Jul 2017
Views 6150
pratik

pratik posted

how to remove header and footer line in pdf made by TCPDF ?


$pdf = new TCPDF();

// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor("Testing");
$pdf->SetTitle($invoice_name);
$pdf->SetSubject($invoice_name);
$pdf->SetKeywords('Invoice');

// set default header data
 $pdf->SetHeaderData(get_template_directory()."/images/logo.png", PDF_HEADER_LOGO_WIDTH, '', '', array(0,64,255), array(0,64,128));
 $pdf->setFooterData(array(0,64,0), array(0,64,128));

// 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));


i think this code adding header and footer . so i want to remove only line at bottom of header and footer .

so tell me solution in TCPDF ?
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00


make header and footer print to false by following code in TCPDF


 $pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
but it removing all header and footer . i want to remove only line belowed at header and footer - pratik  
Jul 21 '17 08:15
you can remove header , footer and re setup it by html by writeHTMLCell function -  
Aug 4 '17 04:22
Post Answer