【发布时间】:2020-06-02 14:04:27
【问题描述】:
我有一个动态生成的 HTML 内容,并希望使用 mPDF 生成一个页码 PDF。问题是当内容跨越多页时,页脚只在最后一页可见。
例子:
$mpdf->AliasNbPages('{PAGETOTAL}');
$mpdf->WriteHTML($content); // $content is dynamic, it can be a series of paragraphs resulting in a 3 or 4, or more, pages long pdf.
$mpdf->setFooter('{PAGENO}/{PAGETOTAL}'); // this only prints a footer in the last page, displaying for example "3/3", but the previous pages do not have footer
我希望每一页都有页脚,但我事先不知道我会有多少页或分页符在哪里。
我是不是做错了什么?
【问题讨论】: