Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mPDF: how to remove setHeader() & setFooter() borders

Tags:

php

mpdf

i have a mPDF report on my system and in the report, it has a header and footer where i use $mpdf->setHeader(); & $mpdf->setFooter(); to set the header and footer. but it displays a bottom border for header and top border for footer. can anyone help me how to remove this?

heres the image:

enter image description here

Here's my Code:

$mpdf=new mPDF('','LETTER-L','','',35,35,60,25,10,10);
//left margin, right margin, body, top margin,top margin,bottom margin, 

/*HEADER Monthly Accomplishment Report*/
$mpdf->SetHeader('Sample');


/*FOOTER xMonthly Accomplishment Report*/
$mpdf->SetFooter('Sample');




//==============================================================
//=====================FILE DESCRIPTION=========================
//==============================================================
$mpdf->SetTitle('Monthly Accomplishment Report');
$mpdf->SetSubject('Report');
$mpdf->SetAuthor('sample');
$mpdf->Output('sample.pdf','I');
exit;
//==============================================================
//==============================================================
//==============================================================
like image 691
Vincent Dapiton Avatar asked Dec 19 '22 08:12

Vincent Dapiton


1 Answers

You could use those two mpdf properties instead:

$mpdf->defaultheaderline = 0;
$mpdf->defaultfooterline = 0;
like image 80
Razvan Grigore Avatar answered Dec 29 '22 07:12

Razvan Grigore