TCPDF set bottom margin zero

被刻印的时光 ゝ 提交于 2020-01-01 04:01:12

问题


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?


回答1:


Margin that you are seeing is due to pageBreak margin

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




回答2:


try this

 $pdf->setCellPaddings(0,0,0,0);

read this... you will get some idea....http://www.tcpdf.org/examples/example_022.phps



来源:https://stackoverflow.com/questions/15779856/tcpdf-set-bottom-margin-zero

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!