flying saucer - page count with css

倾然丶 夕夏残阳落幕 提交于 2020-01-16 00:56:21

问题


I'm using flying saucer to convert HTML data to PDF, but I've one issue to solve.

  • 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.

I want the page counter to only begin on the second page.

How can I do it?


回答1:


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.

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



来源:https://stackoverflow.com/questions/29136505/flying-saucer-page-count-with-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!