问题描述
我想基于模板创建一个新文档,并且需要知道我的插入或附加结果在最终打印输出中何时出现新页面时,是否有任何属性/属性,例如可用于此的页面数?
I want to create a new document based on a template and need to know when my insertion or append results in a new page in the final printed output is there any property/attribute eg number of pages that can be used for this?
推荐答案
我过去搜索过很多次,但我认为没有任何属性或其他方式可以知道页面信息.
I've search this a lot in the past and I don't think there's any property or any other way to know page info.
我使用的解决方案是使用自己对模板工作方式的了解(即,迭代时需要占用多少空间)在模板上或通过脚本插入分页符.然后,我通过计算分页符来知道我在哪一页.
The solution I use is to insert page breaks on my template or via the script, using my own knowledge of how my template works, i.e. how much space it takes as I iterate, etc.And then I know which page I am by counting the page breaks.
无论如何,您可以通过问题跟踪器.
Anyway, you could an enhancement request on the issue tracker.
这篇关于如何查找文档中的页码/页数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!