Page 1 of 1

Ensure PDF Output Page Count Is a Multiple of 4 for Print Formatting

Posted: Mon May 05, 2025 10:07 am
by CLAGARDE
Hello,

We are currently configuring the PDF output of our user manuals using Oxygen XML Editor (DITA-OT integration with custom CSS). For print purposes, our printing partner requires all finalized PDF documents to have a total number of pages that is a multiple of 4 (e.g., 4, 8, 12, etc.).

This constraint is common in booklet-style or saddle-stitched printing to ensure proper folding and alignment of pages. In our case, we would like to automatically add blank pages at the end of the document if necessary, to meet this condition.

Context:

We are using a structured DITA-based documentation workflow.

PDF output is generated using a CSS-based customization layer for PDF Chemistry processor.

We do not wish to manually insert dummy topics or blank pages.

Our goals:

Dynamically detect the number of pages at PDF generation time.

If the page count is not a multiple of 4, automatically append 1 to 3 blank pages at the end of the PDF.

These blank pages should not interfere with the table of contents, page numbering, or indexes.

Questions:

Is there a built-in way in Oxygen or the PDF Chemistry processor to append blank pages based on total page count?

If not, do you recommend a post-processing solution (e.g., script to append blank pages to the PDF after generation)?

Can this be achieved through FO customization or specific CSS print rules, or does it require a hook into the PDF rendering pipeline?

Any guidance or recommended implementation would be greatly appreciated.

Best regards,
Clément

Re: Ensure PDF Output Page Count Is a Multiple of 4 for Print Formatting

Posted: Mon May 05, 2025 6:45 pm
by xephon
There is no solution. We developed our own and call it at the end of the publishing process. We have a custom PDF parameter to force the page count.

Re: Ensure PDF Output Page Count Is a Multiple of 4 for Print Formatting

Posted: Tue May 06, 2025 10:21 am
by julien_lacour
Hello,

Currently Oxygen PDF Chemistry doesn't have the possibility to add extra blank pages at the end of a PDF.
However I added a feature request to add a parameter that allow this. I will notify this thread when it will be available.

Regards,
Julien