Skip to content

Fix multi-page annotated PDF exports and range responses - #29

Merged
bebraw merged 1 commit into
mainfrom
fix/pdf-share-current-object-references
Nov 13, 2026
Merged

bebraw merged 1 commit into
mainfrom
fix/pdf-share-current-object-references

Conversation

@bebraw

@bebraw bebraw commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Annotated PDF exports could lose later pages and fonts when an old compressed object stream appeared after the PDF's current definitions. Resolve the authoritative cross-reference revisions before editing, preserve active compressed objects and supported indirect page-tree values, and reject ambiguous input before publishing a copy. Bound structural decoding and metadata traversal. Also fix R2 range responses whose undefined suffix property produced NaN Content-Range headers.

Regression coverage uses synthetic multi-page PDFs with incremental, stream, hybrid, and obsolete-object references. PDF.js independently checks every page's text/font and a final-page note. Real Workers and browser tests check exact ranges, unchanged originals, immutable shares, revocation, and failure before publication. The original reported 20-page document was compared locally: every page's text/font and rendered pixels match after export; no private paper is committed.

Validation: full native npm run ci:local, targeted regression tests, and pre-push readability/mutation gates. ADR-250 and the feature contracts document the normalization boundary and its limits. Existing shared copies remain immutable; owners create a new copy to distribute a corrected export.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
kirjolab d979b1c Nov 13 2026, 12:08 PM

@bebraw
bebraw merged commit 53102d3 into main Nov 13, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant