Forum How do I...?

Pages counter reset in batched document

rolandw
In order to save on post processing (and hence time) we run a batch of documents through Prince at one time:

prince document1.html document2.html ... documentn.html -o combinedDocument.pdf


Within each document we have counter-reset: page 1 on the body tag and this works fine. However we want to have each document being included in the batch to have its own total page count rather than use the total number of pages in the whole PDF so ideally we would have

<body style="counter-reset: page 1 pages 1;">


but for some reason this just doesn't want to play ball. When we have a 300 document batch the person who gets the first 2 page document from the whole batch is seeing "page 1 of 472" and "page 2 of 472" instead of "page 1 of 2" and "page 2 of 2".

Any ideas?

TIA


Roland
mikeday
At the moment the "pages" counter is always the total number of pages in the final output document. Being able to reset it might be the solution to this issue; we'll investigate this for a future release of Prince.
mikeday
The new beta version of Prince 7.0 includes support for resetting the pages counter, which allows more flexibility in creating documents made up of multiple independent sections.