我有一個動態生成的 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我想要每一頁的頁腳,但我事先不知道我會有多少頁或分頁符在哪里。難道我做錯了什么?
使用 WriteHTML 函數時的 mPDF 分頁問題
慕碼人2483693
2023-04-28 15:08:15