mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-09 12:32:52 +00:00
When a file's last incremental update stops after its cross-reference rows, with no trailer or startxref, the last startxref in the file is the older revision's. pdfcraft-cos finds no startxref in the last 4 KiB and rebuilds from object headers (latest objects win); vendored hayro-syntax read the older table, so the view showed the older revision (PDFBOX-3934: 12 pages, the model 13). ISO 32000-2 §7.5.6: a later section supersedes earlier ones; repair is unspecified and PDFium, MuPDF, Poppler and qpdf take the latest objects. hayro-syntax patch 43: when the last startxref is more than 4 KiB from the end and N G obj headers follow it, Pdf::new_with_password rebuilds first; the older table is read only when the rebuilt one has no page. Trailing data without object headers and a startxref near the end read as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn