Repository navigation
Fix PDF/UA fonts getting the PDF/A-1 CIDSet - #1879
Merged
Merged
Conversation
PDF/UA sets document.subset to 1 (its part number), the same value as PDF/A-1, so embedded fonts of a PDF/UA file got a CIDSet listing only the subset's glyphs. veraPDF rejects that under PDF/UA-1 (7.21.4.2). Only PDF/A-1, which also sets a conformance level, now writes CIDSet. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1878.
PDF/UA sets
document.subset = 1, the same value as PDF/A-1, soEmbeddedFontwrote PDF/A-1's partial/CIDSetinto PDF/UA files, and veraPDF failed them under UA-1 rule 7.21.4.2. The CIDSet is now written only when a PDF/A conformance level is also set (subset_conformance), which onlyinitPDFAdoes.lib/font/embedded.js: the CIDSet condition is narrowed to PDF/A-1.tests/unit/pdfua.spec.js: a new test, font data contains no CIDSet.CHANGELOG.md: an entry for the fix.Checked: the PDF/UA and PDF/A-1/2/3 unit specs pass (23 tests), and the existing PDF/A-1 test font data contains CIDSet still passes. A PDF/UA file with the change passes
verapdf --flavour ua1.🤖 Generated with Claude Code