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

Are you missing a feature? Request its implementation here.
CLAGARDE
Posts: 1
Joined: Mon May 05, 2025 9:31 am

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

Post 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
xephon
Posts: 160
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

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

Post 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.
stefan-jung.org – Your DITA/DITA-OT XML consultant
julien_lacour
Posts: 668
Joined: Wed Oct 16, 2019 3:47 pm

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

Post 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
Post Reply