flying saucer - page count with css
Asked Answered
M

1

2

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?

Mailand answered 19/3, 2015 at 3:0 Comment(0)
M
4

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

Mailand answered 27/3, 2015 at 1:35 Comment(1)
If anyone comes here trying to figure out how to do this, the code in the accepted answer is incomplete. It should be <div style="-fs-page-sequence: start"></div> Nelia

© 2022 - 2024 — McMap. All rights reserved.