I'm using flying saucer to convert HTML data to PDF, but I've one issue to solve.
我正在使用飞碟将HTML数据转换为PDF,但我有一个问题需要解决。
- In my PDF the first page is a introductory page, so this page don't have a number.
- The second page must have a number, and the number of page two must be 1. The thrid page must show Page 2 and etc.
在我的PDF中,第一页是介绍性页面,因此该页面没有数字。
第二页必须有一个数字,第二页的数量必须是1.第三页必须显示第2页等。
I want the page counter to only begin on the second page.
我希望页面计数器只在第二页开始。
How can I do it?
我该怎么做?
1 个解决方案
#1
2
I've discovered. Just put "-fs-page-sequence" in a style on page that you want to start the counter, and the page counter will be reseted.
我发现了。只需将“-fs-page-sequence”放在要启动计数器的页面样式中,页面计数器就会重置。
For instance:
<div style='-fs-page-sequence'></div>
-fs-page-sequence: values start or auto (the default) and allows you to limit the scope of the page and pages counters to a portion of the document
-fs-page-sequence:values start或auto(默认值),允许您将页面范围和页面计数器限制为文档的一部分
#1
2
I've discovered. Just put "-fs-page-sequence" in a style on page that you want to start the counter, and the page counter will be reseted.
我发现了。只需将“-fs-page-sequence”放在要启动计数器的页面样式中,页面计数器就会重置。
For instance:
<div style='-fs-page-sequence'></div>
-fs-page-sequence: values start or auto (the default) and allows you to limit the scope of the page and pages counters to a portion of the document
-fs-page-sequence:values start或auto(默认值),允许您将页面范围和页面计数器限制为文档的一部分