TCPDF将底边距设置为零
问题描述:
我正在使用php中的TCPDF创建pdf文件,我需要将我的数据包含到pdf文件中,而没有底边距,数据将包含在页面的末尾.
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);
我正在使用上面的代码.有人知道如何使用tcpdf从pdf中删除页边空白吗?
I am using the above code.Anyone know how to remove margin space from pdf using tcpdf?
答
您看到的边距是由于pageBreak边距
Margin that you are seeing is due to pageBreak margin
添加此$pdf->SetAutoPageBreak(TRUE, 0);
肯定会消除底部的利润
Add this $pdf->SetAutoPageBreak(TRUE, 0);
definitely remove margin from bottom