简体   繁体   English

TCPDF设置底部边距为零

[英]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. 我在php中使用TCPDF创建pdf,我需要将我的数据包含在没有底边距的pdf中,数据将包含在页面的末尾。

$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? 我正在使用上面的代码。任何人都知道如何使用tcpdf从pdf中删除边距空间?

Margin that you are seeing is due to pageBreak margin 您看到的保证金是由于pageBreak保证金

Add this $pdf->SetAutoPageBreak(TRUE, 0); 添加这个$pdf->SetAutoPageBreak(TRUE, 0); definitely remove margin from bottom 绝对从底部删除边距

try this 试试这个

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

read this... you will get some idea.... http://www.tcpdf.org/examples/example_022.phps 读这个...你会得到一些想法...... http://www.tcpdf.org/examples/example_022.phps

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM