如何获得DOMPDF中的总页数? [英] How can I get the total number of pages in DOMPDF?
本文介绍了如何获得DOMPDF中的总页数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如第1页,共5
。
有一个在线示例如何获取第1页
部分,而不是之5
部分。就是这样:
There's an example online of how to get teh Page 1
part but not the of 5
part. This is it:
.pagenum:before { content: "Page " counter(page); }
我正在使用版本0.6和 $ PAGE_NUM
和 $ PAGE_COUNT
不起作用。
I'm using version 0.6 and $PAGE_NUM
and $PAGE_COUNT
does not work.
推荐答案
默认情况下,出于安全原因,禁用了嵌入式PHP,您需要在dompdf_config.custom.inc.php中自行启用它。请参见此处。
By default, inline PHP is disabled for security reasons, you need to enable it yourself in dompdf_config.custom.inc.php. See here.
目前,您所使用的CSS不支持总页数,但我们计划使其在0.6 Final中使用。
For now, total page count is not supported with the CSS you are using, we are planning to make it work in 0.6 final though.
这篇关于如何获得DOMPDF中的总页数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文