XSL-FO specific page count
Posted: Wed Dec 23, 2020 12:06 am
Hi all,
I have an XSL-FO stylesheet to transform XML documents to PDF using Oxygen 18.1 and the Apache FOP processor. The output PDF should always have a page count that is divisible by 4, so that page count mod 4 = 0.
The stylesheet has 3 page-sequence elements: one for frontmatter, one for the body, and one for backmatter. If the total number of pages of those sequences combined does not equal 0 on mod 4, then blank pages should be added after the last sequence until it does.
My question is: is this even possible using Apache FOP? I believe the force-page-count attribute is meant for this kind of requirement, but it seems to be limited to an odd or even number of pages, not an amount of pages.
Regards,
Hugo
I have an XSL-FO stylesheet to transform XML documents to PDF using Oxygen 18.1 and the Apache FOP processor. The output PDF should always have a page count that is divisible by 4, so that page count mod 4 = 0.
The stylesheet has 3 page-sequence elements: one for frontmatter, one for the body, and one for backmatter. If the total number of pages of those sequences combined does not equal 0 on mod 4, then blank pages should be added after the last sequence until it does.
My question is: is this even possible using Apache FOP? I believe the force-page-count attribute is meant for this kind of requirement, but it seems to be limited to an odd or even number of pages, not an amount of pages.
Regards,
Hugo