Commit 531f6877a847fbfe7373f94b7652ea269a223a02
1 parent
ef961677
Tweak test files to work around fixed ghostscript bug
Ghostscript 10.0.2 failed to handle the files changed in this commit, but ghostscript 10.0.4 handles them fine as do earlier versions. These files all have hybird xref in the form of a file with an xref table appended with a section that has an xref stream. They all have /PageLabels pointing to 107 0 R in the original file, with 107 higher than the highest object. The spec says that this should be treated as null, which results in /PageLabels null, which results in ghostscript errors in that version. While ghostscript 10.0.2 may be handling the file incorrectly, the file does something that's not really kosher, and it's easier to fix the files, which had not been changed since the very first open source release of qpdf, than to try to work around the issue. This was discovered with the GitHub actions runner was bumped to Ubuntu 24.04, which contains the buggy version of ghostscript. I was not able to find a specific ghostscript issue that addressed this, but the problem went away in either 10.0.3 or 10.0.4. Commenting out /PageLabels without changing offsets was a pragmatic move to avoid having to regenerate the xref tables manually. I just had to manually edit the binary xref stream to change the offset of one item (the new object 1), which I put at the end to avoid breaking other things.
Showing
3 changed files
with
44 additions
and
14 deletions
qpdf/qtest/qpdf/good17.pdf
No preview for this file type
qpdf/qtest/qpdf/good18.pdf
No preview for this file type
qpdf/qtest/qpdf/hybrid-xref.pdf
No preview for this file type