Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TCPDF set bottom margin zero

I am creating pdf using TCPDF in php,I need to include my data into pdf without bottom margines,The data will be included at the end of the page.

$pdf->SetLeftMargin(14);
$pdf->SetTopMargin(6);
$pdf->SetFont($fontname, '', '9');
$pdf->setPrintHeader(false);
$pdf->SetFooterMargin(0);
$pdf->setPrintFooter(false);

$pdf->AddPage();
$pdf->writeHTML($html, true, 0, true, 0);

I am using the above code.Anyone know how to remove margin space from pdf using tcpdf?

like image 585
Shijin TR Avatar asked Apr 03 '13 05:04

Shijin TR


1 Answers

Margin that you are seeing is due to pageBreak margin

Add this $pdf->SetAutoPageBreak(TRUE, 0); definitely remove margin from bottom

like image 138
mukund Avatar answered Sep 18 '22 14:09

mukund