2013-04-03 109 views
13

我在php中使用TCPDF創建pdf,我需要將我的數據包含到pdf中,沒有底部頁邊空白,數據將包含在頁面末尾。TCPDF set bottom margin zero

$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); 

我使用上面的代碼。任何人都知道如何從pdf使用tcpdf刪除頁邊空白?

+0

可能附上您收到的輸出 – mukund

回答

54

保證金,你看到的是由於分頁符保證金

添加此$pdf->SetAutoPageBreak(TRUE, 0); 絕對刪除底部的保證金

+0

達姆,這是救命!!!非常感謝!!! :) –

+0

這就是我正在尋找。它刪除了底部空間和右側空間setMargin(0,0,0,false);不會刪除。 – nwolybug

相關問題