Skip to content

Conformance: re-derive the PDF/UA-1 rules against the held ISO 14289-1 text #428

Open

Description

@Tim81

ISO 14289-1:2014 was acquired on 2026-09-07. The 53 rule classes citing it in
VellumPdf.Conformance were authored from veraPDF's profile predicates and from empirical probing,
because the text was not available. It is available now, so every one of them can be checked against
the clause it claims to enforce. None has been.

Split out of #418, which is now scoped to ISO 19005-2 alone. The material below on the Matterhorn
Protocol was written there and moved here, because it is specific to PDF/UA-1.

The normative body of ISO 14289-1 is clause 7 of a 25-page document, so this is a bounded read
rather than an open-ended one.

A confirmed defect, found by sampling the method on one rule

Source What it says
ISO 14289-1:2014 §7.21.3.1 the CIDFont's Supplement "shall be greater than or equal to" the CMap's, with a NOTE: the requirement "ensures that the font includes glyphs for all CIDs which can be referenced by the CMap"
ISO 32000-1:2008 Table 116 Supplement "shall not be used in determining compatibility between character collections" — the base standard imposes no direction
veraPDF 1.30.2 PDFUA-1.xml and PDFA-2B.xml CIDFontSupplement <= CMapSupplement, and both profile descriptions quote the clause as "less than or equal to"
VellumPdf UaCidSystemInfoRule and FontStructureRule.CheckCidSystemInfo report an error when the CIDFont's is greater, matching veraPDF and contradicting ISO 14289-1

veraPDF's profile misquotes the standard and inverts the test, and this library inherited the
inversion when the rule was written from the profile. The clause's own NOTE settles it: a CMap can
reference CIDs up to its supplement and the font must have glyphs for them, so the font's supplement
must be at least the CMap's. veraPDF's direction requires the opposite and defeats the stated
purpose.

Both call sites should be corrected on that reasoning, PDF/UA-1 and PDF/A-2 alike. ISO 19005-2 is
not held, but its clause carries the same requirement for the same reason, and leaving one side
inverted would keep a known-wrong predicate in shipped code to preserve agreement with a validator
that is wrong.

Why this is blocked on the differential harness

Correcting that rule makes VellumPdf disagree with veraPDF on two profiles. As things stand today
that fails OracleTests, which compares one boolean IsCompliant per fixture across 273 cases, and
ConformanceCatalogTests.Catalog_MatchesVeraPdfProfile, which set-diffs catalogue ids against the
profile XML and fails in both directions. A correction and a regression are indistinguishable under
those conditions.

Three things have to exist first:

  • a per-rule outcome, so Passed, Failed, NotApplicable and Indeterminate are distinguishable;
    today a rule that returns early reads as a pass
  • the per-rule veraPDF comparison from veraPDF oracle tests collapse per-rule findings to a single pass/fail bit #419, so "we differ on one rule and agree on the other
    fifty-two" is expressible
  • a committed divergence table, so a deliberate disagreement is recorded rather than forced back
    into agreement

Three readings, not one

  • ISO 14289-1:2014 is the authority. The text decides.
  • The Matterhorn Protocol 1.1 is an independent second reading. It predates veraPDF's PDF/UA
    support and is independent of it: veraPDF's PDF/UA rules transcribe Matterhorn, not the other way
    round. It is also a ceiling on what any accessibility oracle can prove: 87 of its 137 failure
    conditions are machine-checkable, 48 require human judgement, 2 are unassigned (its own changelog
    explains why the count reads as 136 in the document's prose). That ceiling is not specific to this
    project; it bounds veraPDF's PDF/UA-1 checking too.
  • veraPDF 1.30.2 is the third, and is evidence rather than a verdict.

Where all three agree the rule is settled. Where the text and Matterhorn agree against veraPDF, the
library follows the text and the disagreement is recorded.

For PDF/UA-2 there is no Matterhorn. veraPDF's profile is the only enumerated rule set in existence
for it, so the lineage problem is total there, and holding ISO 14289-2 does not by itself produce an
independent second opinion the way it does for UA-1. That asymmetry belongs to #275 and #280.

Shape of the work

Five passes, split along the standard's own clause structure so each reads a contiguous run of text:

Pass Clauses
1 7.1–7.9: general, text, graphics, headings, tables, lists, mathematical expressions, page headers and footers, notes and references
2 7.10–7.17: optional content, embedded files, article threads, signatures, non-interactive forms, XFA, security, navigation
3 7.18: annotations, with tab order, forms, links, media, file attachments and printer marks
4 7.19–7.20: actions and XObjects
5 7.21: fonts, eight subclauses, where the defect above sits

Per rule: read the clause its Clause property names, cross-check the matching Matterhorn failure
condition, and record a verdict — matches the text, diverges from it, enforces something the text
does not require, or leaves a clause unenforced. Every silent early return the reading exposes
becomes an explicit NotApplicable or Indeterminate outcome. Pin value-level known-answer tests on
anything that changes, and assert the fixture encodes the construct before trusting any engine.
Clauses with no rule become catalogue entries or new issues, not silent gaps.

Also in scope

The XML-doc sentence claiming a rule was derived from the specification text appears on 70 of the
101 rule classes, and 49 of those already name veraPDF in the same file. For the rules covered here
that claim was not true when it was written. Correcting it for the PDF/UA-1 rules belongs to this
issue; #418 keeps the PDF/A half.

A second defect in the same rule pair, confirmed 2026-09-07

The Supplement inversion is not the only thing these two rules inherited from the profile. Both
also carry an exemption that ISO 14289-1 does not grant.

The standard keys its exemption on one thing: "If the Encoding key in the Type 0 font dictionary
is Identity-H or Identity-V, any values of Registry, Ordering and Supplement may be used in the
CIDSystemInfo entry of the CIDFont."
The requirement then applies "otherwise".

UaCidSystemInfoRule and FontStructureRule.CheckCidSystemInfo implement that correctly, and then
add a second exemption keyed on something else: an embedded CMap stream whose own /CMapName is
Identity-H or Identity-V. Those are different populations. When /Encoding is a stream rather than
a name, the Encoding key is not Identity-H or Identity-V, so the standard's exemption does not
apply whatever the stream calls itself.

The comment in FontStructureRule says where it came from, in as many words:

An embedded CMap whose own /CMapName is Identity-H/V is exempt too — veraPDF keys the exemption
on the CMap name, not the /Encoding reference (avoids a false positive on the unusual case of an
embedded Identity CMap).

Measured against the held text: CMapName occurs zero times in the whole of ISO 14289-1, and
Identity-H / Identity-V occurs exactly once, in the sentence above. Clause 7.21.3.3, which
is the CMap clause, says nothing that licenses it. So for PDF/UA-1 the second exemption has no
basis in the standard.

This one matters more than the inversion, because it fails in the safer-looking direction. An
over-broad exemption suppresses a finding the standard wants raised, so a non-conformant file
passes silently. The inversion at least fires.

The PDF/A-2 twin is the same code and presumably the same defect, but ISO 19005-2 clause 6.2.11.3.3
has not been read yet; that check belongs to #418's sweep.

Both corrections are gated the same way: they make this library disagree with veraPDF, which fails
the aggregate oracle and the profile set-diff, so #419 and the per-rule comparison land first.

Closing condition: NOTICE has to change back

NOTICE carried an unqualified claim that this product "is not derived from, any third-party PDF or
barcode library". That is false while any shipped rule was authored from veraPDF's validation
profiles instead of a standard's text, so #438 qualified it, naming veraPDF the way the file already
names zxing-cpp and pointing here.

That qualification is temporary and this issue owns removing it. When the rules in scope here
are re-derived from the clause texts, the qualifying sentences come out of NOTICE and the original
claim stands again unqualified. Closing this without doing that leaves the file understating the
project's own provenance, which is a worse failure than the overstatement it replaced, because it is
the direction nobody audits.

The pointer currently runs one way: NOTICE names this issue, and nothing here required the reverse
until now.

A durable version of this exists once rule provenance is a machine-checkable field rather than a
prose sentence. The NOTICE qualification is then gated on data: while any registered rule declares
profile-derived provenance the qualification must be present, and when none does it must be absent.
Until that field exists, this paragraph is the mechanism.

Activity

  1. Tim81 commented on Nov 21, 2026

    @Tim81
    OwnerAuthor

    Audit against the held ISO 14289-1:2014 text, 2026-11-21. The 52 PDF/UA-1 rule classes on origin/main 9747913 were compared with clause 7, and 25 hand-built files were run through our preflight and veraPDF 1.30.4 (--flavour ua1).

    • Verdicts: 8 match, 23 narrower, 12 broader, 6 cite the wrong clause, 3 unsure (each with what would settle it). No rule enforces a "should" as a "shall".
    • On 10 files the two validators disagree; the clause text sides with veraPDF on all 10 (8 our preflight passes, 2 it wrongly refuses: a missing catalog /Lang, which 7.2 does not require when 7.9.2 language tags are used, and dynamicRender = Required).
    • Two places where the text disagrees with veraPDF as well as with us: the CIDSystemInfo Supplement comparison is inverted, and Popup annotations are not exempted as 7.18.1 exempts them. A test that asserts parity with veraPDF cannot catch these.
    • The largest single cause: the font (7.21), artifact (7.1), 7.20 and 7.2 content rules look only at page content streams, not form XObjects, appearance streams or Type 3 glyphs; Type 0 fonts are skipped by the embedding and ToUnicode rules.
    • 33 machine-checkable "shall" rows in clause 7 have no rule or only part of one (among them 7.21.2, the fsType sentence of 7.21.4.1, ListNumbering in 7.6, pagination artifacts in 7.8).
    • Provenance: 34 places (the shipped package README and 30 per-rule remarks among them) say the rules were written against the text; the rule files predate the text's acquisition. Two rule messages call H "weakly structured" and H1-H6 "strongly structured", the reverse of ISO 32000-1 14.8.4.3.5.

    Plan (maintainer, 2026-11-21): the false statements are fixed in v2.4 (#675); the rule fixes move to v2.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions