我用mpdf从html生成pdf .
这个生成的pdf有一个问题,即显示一页额外的内容 . 如果内容在第1页结束,则它生成2页,如果内容在第2页结束,则生成3页 .
这是我的代码 -
<?php
include("mpdf/mpdf.php");
$mpdf=new mPDF('fsalbertpro','A4','','' , 0 , 0 , 0 , 0 , 0 , 0);
$html='----'; // this variables contain all css and HTML to be shown in PDF
ob_clean(); // cleaning the buffer before Output()
$mpdf->SetDisplayMode('fullpage');
$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
$mpdf->WriteHTML($html);
$mpdf->Output();
?>
那么如何删除最后一个空白页呢?
1 回答
我有同样的问题 . 有一次,我有一个
这导致空白页面 . 删除后,空页消失了 .