Forum Bugs

pypdf issue

Hi, I am trying to use pdfstitcher ( for combining several PrinceXML-generated PDF. But I get an error message, similar to this:

When I load and save the PDF with Master PDF Editor, making no changes, then pdfstitcher works. So it seems that it doesn't like some aspect of the PrinceXML generated PDF.

Another remedy is to use pdfunite to read and write the file, which gives warnings such as "reported number of objects (192) is not one plus the highest object number (210)" but produces files that pdfstitcher will read.

Is there some known way to tweak the Prince output format so that it is more to the liking of those PDF tools?

Or is there a simpler way for me to make an outline directly with Prince?

This is with version 14.2.


We will investigate this issue.
pdfstitcher is likely only reading one of two xref tables in the PDF. Prince generates two xref tables when using object streams, to maintain compatibility with very old PDF viewers. You can call Prince with --no-object-streams to disable use of object streams, and work around the problem.
Thanks, that flag fixes the issue.