You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Layout: Preformatted does not refuse a private-use character under PDF/A-2a (ISO 19005-2 6.2.11.7.3) #785
A Preformatted block under PdfConformance.PdfA2a that holds a private-use character saves without a
warning and fails veraPDF. Measured with veraPDF 1.30.4, flavour 2a, on a document with a tagged,
PDF/A-2a Document, one Preformatted("a\uEF00b", style) in DejaVuSans (which maps U+EF00): the report fails rule
6.2.11.7.3-1 and nothing else. ISO 19005-2:2011, 6.2.11.7.3 (Level A only) asks for an /ActualText entry for a
character mapped to the Private Use Area, and the library writes none. PreformattedChecks.CheckCharacters refuses
U+0000, U+FEFF and U+FFFE and glyph 0, and has no private-use check.
TextStyle.FallbackFonts (#601) refuses the same character under PDF/A-2a for a chained style, so the two
elements now disagree. veraPDF counts plane 15 as private use too: a chainless paragraph with U+F0000 in a font that
maps it fails 6.2.11.7.3-1 under 2a (measured locally on a font that is not in the tree). Plane 16 was not run
through the validator.
Proposal
Add a private-use check beside the U+FEFF check in PreformattedChecks.CheckCharacters, under PdfA2a only, over
U+E000 to U+F8FF, U+F0000 to U+FFFFD and U+100000 to U+10FFFD, with the clause ISO 19005-2:2011, 6.2.11.7.3 in
the message and a remedy that names PDF/A-2u and Conformance = None. Preformatted is new in v2.4, so the refusal
is a refusal of a new member's input, which a new member may make from the start, and removes nothing that 2.3.3 saved. Share the range with FallbackChecks.IsPrivateUse (added with #601) instead of copying it. Document it on the Preformatted constructor and type remarks.
When #602 writes /ActualText, the refusal goes.
Acceptance
new Preformatted("a\uEF00b", dejavu) in a PdfA2a document throws InvalidOperationException before any layout,
naming U+EF00, the line and the clause; after Conformance = PdfA2u the same document saves and veraPDF 2u
passes.
U+F0000 and U+10FFFD are refused the same way (the second needs no font that maps it, because the check runs
before the glyph check).
U+E000 under PdfA2b and PdfA2u saves.
Each of the three ranges has a test, and a mutant that drops the check or applies it under 2u fails one.
Activity