Skip to content

Handle null Form resources without losing inline measurements - #3

Merged
pabszero merged 2 commits into
mainfrom
fix-null-form-resources
Oct 25, 2026
Merged

pabszero merged 2 commits into
mainfrom
fix-null-form-resources

Conversation

@pabszero

Copy link
Copy Markdown
Owner

A Form with a direct or indirect /Resources null currently turns the scan partial before its named-color inline images can be measured. Treat PDF null like an omitted entry after resolving the object, preserving the existing legacy resource fallback. Keep an explicitly empty dictionary empty.

Bump the tool and package to 0.2.1 and document the limited compatibility behavior. PDF 32000-1 sections 7.3.7/7.3.9 define null-entry equivalence; section 7.8.3 describes the legacy inheritance construct as obsolete. This does not assert modern PDF conformance.

Validation: both null subcases fail on 0.2.0; absent and empty-dictionary controls pass. All 30 tests pass on Windows CPython 3.12.14 and 3.13.5, and against the installed wheel on 3.13.5. Wheel and sdist builds pass. An independent synthetic nested-Form CLI check passes for seven PDFs, including null/empty distinctions, resource overrides and context-dependent reuse. No historical corpus results or PDF bytes are changed.

Prepared and independently checked with OpenAI Codex assistance. This is a change to my own project, not external maintainer acceptance or adoption evidence.

@pabszero
pabszero merged commit 616738b into main Oct 25, 2026
8 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