DOMPDF将页脚添加到最后一页

时间:2019-08-20 13:26:07

标签: php html dompdf

我正在尝试使用dompdf库生成pdf,我希望页脚仅出现在最后一页上,我将如何实现此目的,但在其GitHub中找不到文档。我当前的代码:

   // reference the Dompdf namespace
use Dompdf\Dompdf;

// instantiate and use the dompdf class
$dompdf = new Dompdf();
$dompdf->set_option('isHtml5ParserEnabled', true);
$dompdf->set_option('isRemoteEnabled', true);
$dompdf->loadHtml($html);

// (Optional) Setup the paper size and orientation
$dompdf->setPaper('A4', 'portrait');

// Render the HTML as PDF
$dompdf->render();

// Output the generated PDF to Browser
$dompdf->stream();

0 个答案:

没有答案