gpt4 book ai didi

MPDF 如何删除空白边距

转载 作者:行者123 更新时间:2023-12-03 14:36:46 29 4
gpt4 key购买 nike

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

嗨,任何人都知道如何删除 pdf 底部的空白,这是图像' http://tinypic.com/view.php?pic=xfdixj&s=8 ',我想删除底部的空白,谁知道
怎么办?THX

最佳答案

以 0 边距或任何您想要的方式创建它

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

关于MPDF 如何删除空白边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26071051/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com