Skip to content

PDF/A and PDF/UA-1 conformance rules are validated against veraPDF, not against the ISO text they cite #418

Open

Description

@Tim81

The gap is written down on main as of ce9cac0. docs/architecture.md states it directly, and
half of it has since closed: ISO 14289-1 was acquired on 2026-09-07. The 53 rule classes citing it
became checkable against the text that day; re-deriving them is tracked in #428. This issue is rescoped to ISO 19005-2 alone. A clause citation to ISO 19005
stays unverified until that standard is acquired and the rule re-derived against it.

This issue is about closing that gap, and about what has accumulated while it stayed open.

Measured: 48 rule classes cite ISO 19005-2:2011 (38 distinct clauses), out of 101 rule classes.
docs/architecture.md says 50 for the same standard. Both are right and they are not in conflict:
this issue counted only citations carrying the year suffix, the document counts every citation to the
standard. Re-deriving the pattern over ce9cac0 reproduces 48 with the suffix and 50 without it.

The remedy is cheap, and asymmetric between the two standards

  • ISO 14289-1 (PDF/UA-1) was free. The PDF Association's sponsored-standards programme lists it at
    https://www.pdfa-inc.org/product/pdf-ua-bundle/, price $0.00, bundled with ISO 14289-2, ISO/TS
    32005, WTPDF, and the Tagged PDF best-practice guide. It is now held; the re-derivation it unblocks is Conformance: re-derive the PDF/UA-1 rules against the held ISO 14289-1 text #428.
  • ISO 19005-2 costs CHF 181 (all four PDF/A parts together are CHF 680).

What has accumulated by validating against the oracle instead of the clause

  • ConformanceCatalogTests.Catalog_MatchesVeraPdfProfile opens the veraPDF CLI jar, extracts every
    clause/testNumber pair from the profiles, and fails the build in both directions — a rule the
    ISO text requires but veraPDF omits from its profile also breaks this build.
  • ConformanceCatalog.cs:101-105 calls the catalog "the single source of truth for how much of
    veraPDF is implemented," while its own remarks block a few lines above (:33-37) says "No veraPDF
    profile content is embodied here — the clean-room stance is preserved." Both statements describe
    the same file.
  • Several PDF/A rules were derived by probing the oracle rather than reading a clause:
    ConformanceCatalog.cs:221-222 and :248 record clauses "moved to Implemented" once behaviour was
    "probe-confirmed against veraPDF 1.30.2". Probe-confirmation is not a defect in isolation — it is
    how you find veraPDF's actual behaviour when you cannot read the clause — but it means the resulting
    rule encodes veraPDF's interpretation, not an independently derived one, and the catalog does not
    currently distinguish the two provenances.
    • src/VellumPdf.Conformance/Rules/RuleRegistry.cs:136 goes a step further: A2aContentItemTaggingRule is downgraded to a
      warning "because veraPDF's PDF/A-2a profile implements no equivalent, so an error here would
      contradict the reference implementation." That is a rule's severity set to preserve agreement
      with the oracle, not to match the standard's own requirement.
  • src/VellumPdf.Conformance/README.md:6, which ships to NuGet, describes "clean-room conformance
    rules authored from the ISO specifications." On this evidence that description is not accurate for
    the PDF/A rules specifically — they are authored from veraPDF's profile content and cross-checked
    against it, since the ISO text was never held. This is a correctness issue in published material,
    separate from the code-level gap. (The same defect exists for the PDF/UA-1 rules; correcting it is part of Conformance: re-derive the PDF/UA-1 rules against the held ISO 14289-1 text #428.)
  • Scale: this block accounts for roughly 304 of the ~490 logged oracle invocations in the suite.

What a veraPDF comparison still catches, despite the ancestry

It proves less than the code and docs currently claim, but it is not worthless: it catches
implementation bugs, where the rule code fails to do what the profile itself says;
parser defects, since veraPDF's Java parser is genuinely independent of this library's; rule-inventory
omissions; false positives on conforming files; and regressions once a rule is in place. What it
cannot catch is a misreading of the clause shared between veraPDF and this project, or a requirement
veraPDF's profile does not implement at all.

ConformanceCatalogTests.Catalog_MatchesVeraPdfProfile calls Assert.Skip directly, consulting no
OracleGate, and skips in CI because the veraPDF jar sits inside a Docker shim there — so the
inventory check that guards against silently missing a rule currently runs only on a developer
machine.

Context, not yet verified

Published comparisons suggest independent PDF/A engines diverge often enough that a second
opinion would be informative on its own terms, not just as a lineage fix — flagged here as read from
search summaries, not verified directly: a three-engine PDF/A study found 71 of 293 files divergent.

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. added this to the Backlog milestone on Sep 7, 2026
  2. Tim81 commented on Sep 7, 2026

    @Tim81
    OwnerAuthor

    Correction to a figure in the body. It quoted docs/architecture.md saying ISO 19005-2 and ISO 14289-1 are cited "about 1400 times". That number counted every textual mention across the package — tests, comments and prose included — not clause citations, and it overstated the work by more than a factor of ten. The author of that line has since re-measured and corrected it at source.

    The body's own second figure was the right one all along and is unchanged: 48 rule classes cite ISO 19005-2 across 38 distinct clauses, and 52 cite ISO 14289-1 across 30, over 101 rule classes. An independent count using a different filter gave 53, 56 and 105, which is filter choice rather than disagreement.

    Two consequences worth stating.

    The re-derivation is roughly a hundred rules, not fourteen hundred citations. That is a materially smaller and more tractable piece of work than the issue first implied, and it changes how this should be scheduled — a hundred rules against two standards is a milestone, not an epic.

    The rest of the issue is unaffected. The catalogue test that fails the build on any divergence from veraPDF's rule set in either direction, the rule downgraded so it would not contradict the reference implementation, and the fact that neither standard is held — none of those depend on the count. Nor does the acquisition position: ISO 14289-1 is free through the PDF Association's sponsored bundle, and ISO 19005-2 is CHF 181 at list, worth confirming at purchase since prices move.

    Recording it here rather than editing it away, because the wrong number was quoted in good faith from a source that has since been fixed, and the next reader should be able to see that happen.

  3. Tim81 commented on Sep 7, 2026

    @Tim81
    OwnerAuthor

    The Matterhorn count is now settled against the document itself, which has since been acquired and is held at docs/iso/free/. The body's figures stand, and the reason they differ from the document's own prose is now known rather than hedged.

    Total Machine Human Neither
    The document's clause 1 136 87 47 2
    Its actual failure-condition tables 137 87 48 2

    Both are internally consistent and they differ by exactly one row: 13-008, "ActualText not present when a <Figure> is intended", classified H. The revision history records it as added in revision 1.1 (2020-11-10) without the summary sentence being updated. The two conditions carrying no method are 23-001 and 27-001, exactly as clause 1 names them.

    Two notes for anyone who re-derives this.

    The revision history has a separate, earlier entry — 1.01, 2014-02-11, "Changed two 'Machine' checks to 'Human'" — which is easy to misread as explaining the discrepancy. It does not; it predates the added condition by six years.

    A naive text extraction yields 138 unique identifier-shaped strings, because the "See" column cross-references other conditions. Counting identifiers anywhere gives the wrong answer. Anchoring on identifiers that begin a table row gives 137.

    Nothing else in this issue changes. The ceiling on what any validator can prove is unaffected — 47 of 136 and 48 of 137 both round to 35% of failure conditions requiring human judgement.

  4. Tim81 commented on Sep 7, 2026

    @Tim81
    OwnerAuthor

    Two updates from ce9cac0, and one thing this issue should decide before anyone starts the sweep.

    ISO 14289-1 is held as of 2026-09-07, so the body's "neither standard is held" was false and is now corrected. The gap is ISO 19005-2 alone. The 53 rule classes citing PDF/UA-1 are checkable against the text today; none has been checked, so their status moves from "unverifiable" to "unverified", which is a smaller claim but still not a clean one.

    The 48/50 and 52/53 figures are not a discrepancy. This issue counted only citations carrying the year suffix, docs/architecture.md counts every citation to the standard. Re-derived over ce9cac0, the suffixed pattern gives 48 and 52 and the unsuffixed one gives 50 and 53, out of 101 rule classes in src/VellumPdf.Conformance/Rules.

    The comment sweep needs a stated predicate, not a file count. docs/architecture.md puts it at 69 rule files. I could not reproduce that number, and the reason is that the answer moves a long way with the pattern, because the provenance sentence is not written the same way twice:

    Predicate over Rules/**/*.cs Files
    contains the literal not from any third-party 50
    contains third-party in any form 64
    mentions the specification as a source, or clean-room, and cites either standard 71
    mentions the specification as a source, or clean-room 77

    Only 49 of the 50 files in the narrowest row cite either standard, so even the tightest reading has one file whose provenance sentence is about something else. A sweep driven by a number will either miss files or rewrite headers that were accurate. Whoever takes this should land the predicate first, as a grep in the issue, and let the file list fall out of it.

    Sequencing with #405. That issue rewrites message-construction lines across roughly forty sites in the same Rules/** files this sweep rewrites headers in. They do not collide semantically, but they collide textually, and #405 is the one with a Shipped surface and a byte-identity proof attached. #405 should land first and this sweep rebase onto it, rather than the other way round.

  5. 13 remaining items

  6. Tim81 commented on Nov 21, 2026

    @Tim81
    OwnerAuthor

    Audit against the ISO 19005-2 text, 2026-11-21. Clause 6 and Annexes A and B were read on a licensed copy (NEN-ISO 19005-2:2011, online). The 48 rule classes citing ISO 19005-2 on origin/main 9747913 were compared with the clause text, and 21 hand-built files were run through our preflight and veraPDF 1.30.4.

    • Verdicts: 13 match the clause, 26 are narrower (pass files the clause refuses), 3 are broader (refuse files the clause allows; each is also narrower elsewhere), 6 cite the wrong clause.
    • In every probe the clause agreed with veraPDF: 18 files our preflight passes and both the clause and veraPDF refuse, 3 files our preflight refuses and both accept.
    • The largest single cause: most rules look only at a page's own content stream and resources. ISO 19005-2 6.2.2 makes form XObjects, Type 1 patterns, Type 3 glyph procedures and annotation appearances content streams too, and 6.2.2 exempts only resources a stream never names.
    • Examples: ToUnicode is checked only for Type 0 Identity fonts (6.2.11.7.2 covers every font outside four exempt categories); content-stream operands are not checked against 6.1.13; the signature /Contents string is exempted from the 32,767-byte limit, which no clause grants; the zero-area annotation exemption (6.3.3) uses "or" where the clause needs both dimensions equal; the .notdef check skips text rendering mode 3, which 6.2.11.8 covers.
    • Provenance: 39 of the 48 classes say they were derived from the specification text; several quote veraPDF test expressions. The catalog's "Implemented" status is wrong for at least 19 clause tests, and the README's parity figure is computed from it.

    Plan (maintainer, 2026-11-21): the false provenance and status statements are fixed in v2.4 (#675); the rule fixes move to v2.5, grouped by cause, with the veraPDF-parity test changed to allow documented, cited deviations.

  7. Tim81 commented on Nov 22, 2026

    @Tim81
    OwnerAuthor

    Finding from #677 (merged as 2316dee), for the v2.5 rule fixes here and in #428.

    Many rules walk only the resources of the page itself, so a violating construct placed inside a form XObject that the page draws is not reported. A probe sweep put each construct once on the page (control) and once only inside a form drawn with Do:

    • 44 PDF/A-2 clause tests and 15 PDF/UA-1 tests: veraPDF 1.30.2 and 1.30.4 fail both files, this library fails only the page file. They are now Partial in ConformanceCatalog, each with a note naming the construct (for example /HTP or a non-Default /TR in a form's ExtGState, an image with /Interpolate true drawn in a form, an unembedded font shown only in a form, a DeviceN with 33 colourants selected in a form).
    • Rules that already reach forms: the rules behind 6.2.2-1, 6.1.10-1 and 6.2.4.4-2.
    • Not swept: Type 3 glyph procedures, tiling patterns and annotation appearance streams.

    With the audit findings, ConformanceCatalog.Coverage now reports 78.0% / 77.9% / 78.0% (PDF/A-2b/2u/2a) and 87.7% (PDF/UA-1), down from 99.3% and 99.5%. The likely single fix is one shared resource walk that follows form XObjects (and later patterns, Type 3 procedures and appearance streams) for every rule that reads resources, so the Partial notes in the catalog list the cases a fix must turn back to Implemented.

  8. Tim81 commented on Nov 30, 2026

    @Tim81
    OwnerAuthor

    The JPEG 2000 rule (6.2.8.3) is split out to #792 for v2.4: it counts every channel where the clause counts colour channels.

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