mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-31 23:59:07 +00:00
iText's indirectPrev.pdf writes /Prev 6 0 R, and object 6, listed in the same update, holds 470, the offset of the first section. Both readers took the object number as the offset, so cos found no section at 6, rebuilt the file from object headers and lost its revision list, and hayro's chain stopped there. When /Prev is a reference, the sections read so far (cos) or the section's own entries (hayro, which now reads them before following /Prev) are asked for that object first. If it holds a non-negative integer, that is the offset; otherwise the object number still is, as the tiff2pdf files need. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NH3itd85jPuM6wNjgcGfEH