2014-09-27 20 views
7
$style='<style>@page *{ 
margin-top: 0cm; 
margin-bottom: 0cm; 
margin-left: 0cm; 
margin-right: 0cm; 
}</style>'; 

$html ='<img src="temppng/'.$_GET['memid'].'.png" width="325.03937" height="204.094488" `/>'; 

include("MPDF54/mpdf.php"); 

$mpdf = new mPDF('utf-8', 'Letter', 0, '', 1, 1, 1, 1, 8, 8); 
$mpdf->useAdobeCJK = true; 
$mpdf->SetAutoFont(AUTOFONT_ALL); 
`$mpdf->SetMargins(0); 
$mpdf->WriteHTML('<pagebreak sheet-size="86mm 54mm" />'); 
$mpdf->WriteHTML($style); 


$mpdf->WriteHTML($html); 
$mpdf->WriteHTML('<tocentry content="150mm square" />') 

$mpdf->DeletePages(1,1); 
$mpdf->Output(); 

Cześć, ktoś wie jak usunąć dolną białą przestrzeń pdf, tutaj jest obraz „http://tinypic.com/view.php?pic=xfdixj&s=8”, chcę usunąć dolną białą przestrzeń, jedno wiem ? jak zrobić THXMPDF Jak mogę usunąć białą przestrzeń margines

Odpowiedz

12

Tworzenie go z 0 marginesów lub cokolwiek, które chcesz odpowiednio

$mpdf=new mPDF('utf-8', 'Letter', 0, '', 0, 0, 0, 0, 0, 0); 




class mPDF ([ string $mode [, mixed $format [, float $default_font_size [, string $default_font [, float $margin_left , float $margin_right , float $margin_top , float $margin_bottom , float $margin_header , float $margin_footer [, string $orientation ]]]]]]) 
+0

Proszę podać wyjaśnienie z kodem – dayuloli

+0

dokumentacja klasy mPDF znajduje się w [https: //mpdf.github .io/reference/mpdf-functions/mpdf.html] (https://mpdf.github.io/reference /mpdf-functions/mpdf.html) na wypadek, gdyby ktoś tego potrzebował, ja to zrobiłem. – SylvrFalkon

Powiązane problemy