Forum How do I...?

How getting a page count multiple of 4?

Hi, I need to produce PDFs with a number of pages that is strictly a multiple of 4 (4, 8, 12, etc.) and I wonder if there is an automatic solution for that.

For example, is that possible to generate extra blank pages (just before the back cover) and ask Prince to delete dynamically some of them once the total page count is known?

Many thanks,
- Vincent
You would need to run Prince twice and log the page count the first time, then apply CSS to add extra pages the second time.
If anyone comes to this page from Google (as I did) with the same problem, we have implemented a solution in Node.js, details are in this post: