Repository navigation
Description
VellumPdf writes %PDF-2.0 by default (PdfDocument.cs:600-604, :996, :1663) — but the
moment a caller asks for a conformance profile, it silently downgrades to %PDF-1.7, because the only
profiles the library implements (PDF/A-2, PDF/UA-1) are defined against ISO 32000-1.
So today there is no way to produce an archival document that is also PDF 2.0. The 2.0 output path
is the unvalidated one, and the validated path is not 2.0. PDF/A-4 (ISO 19005-4:2020) is the profile
that closes that gap — it is defined against ISO 32000-2 and requires a %PDF-2.n header.
PDF/A-4 and 19005-4 still do not appear in the tree. PDF/UA-2 and 14289-2 now do: #275-#280 and
#246 track the rule set, and ISO 14289-2 is held on disk. This is the tracker for PDF/A-4.
The oracle is already available
veraPDF 1.30.2 — the pinned version — ships flavours 4, 4f, 4e and ua2. Confirmed from the
CLI's own --flavour enumeration:
Possible Values: [0, 1a, 1b, 2a, 2b, 2u, 3a, 3b, 3u, 4, 4f, 4e, ua1, ua2, wt1r, wt1a]
So both paths of every rule can be cross-validated in CI exactly as PDF/A-2 and PDF/UA-1 are, with no
oracle change. The 4 profile carries 103 rules.
Conformance levels
PDF/A-4 drops the A/B/U split entirely — there is no separate accessible or Unicode level, because
Unicode mapping is required of every conforming file and tagging is deferred to PDF/UA. Instead:
PdfA4— the base levelPdfA4F— permits embedded files that are not themselves PDF/APdfA4E— engineering, adds 3D/RichMedia
Scope this issue to PdfA4 and PdfA4F. PdfA4E needs PRC/U3D support the library does not have
and should not acquire for this.
What we are actually missing — mapped rule by rule
Verified against the writer, not assumed.
| Rule | Requirement | Where we stand |
|---|---|---|
| 6.1.2/1 | header is %PDF-2.n |
The default path already does this. The conformance path must stop forcing 1.7 — PdfDocument.cs:600-604, :996, :1663 all branch on Conformance == PdfConformance.None, which becomes wrong once a 2.0 profile exists. |
| 6.1.3/5 | if /Info is present it may contain only /ModDate |
Blocking gap. PdfDocumentInfo carries Title, Author, Subject, Keywords, Creator, Producer and is always written (PdfDocument.cs:786, :1170). A PDF/A-4 file must move all of it to XMP. |
| 6.1.3/4 | /Info present ⇒ catalog needs /PieceInfo |
/PieceInfo appears nowhere in the tree. |
| 6.7.3/2 | pdfaid:part = 4 |
XmpMetadataWriter.cs:127-129 writes part; needs the new value. |
| 6.7.3/3 | pdfaid:conformance must be absent for base PDF/A-4 |
Gap. XmpMetadataWriter.cs:130-132 always emits <pdfaid:conformance>. It has to become conditional. |
| 6.7.3/5 | pdfaid:rev = "2020" |
Gap. No pdfaid:rev is emitted at all. |
| 6.9/4 | embedded files need /AFRelationship |
/AFRelationship appears nowhere in the tree. Only needed for PdfA4F. |
| 6.1.6.2/1 | LZWDecode prohibited |
Satisfied by construction — LZW is decode-only in this library; there is no LZW encoder on the write path. |
| 6.1.3/2 | /Encrypt prohibited in the trailer |
Already expressible — conformance output is written unencrypted. |
| 6.2.9/2 | transparency allowed, given a blending colour space or output intent | Output intents are already implemented. PDF/A-4 is more permissive here than PDF/A-2, so this is a relaxation rather than work. |
| 6.2.10.7/1 | ToUnicode values may not be U+0000, U+FEFF, U+FFFE | The Conformance rules for this exist for PDF/A-2; they generalise. |
| 6.1.11/1 | permissions dictionary limited to /UR3 and /DocMDP |
Signing already writes /DocMDP; needs a check, not new capability. |
#199 becomes load-bearing, not cosmetic
#199 (Info.Keywords is never mirrored into the XMP packet) is currently filed as a small
metadata defect. Under 6.1.3/5 it is a prerequisite: PDF/A-4 permits nothing but /ModDate in
/Info, so XMP becomes the only place document metadata can live. Every PdfDocumentInfo property
needs an XMP counterpart before a PDF/A-4 file can carry them at all. Worth linking the two.
Why this rather than PDF/A-1 (#218)
Both are unimplemented profiles. The difference is direction: #218 adds a 2005 profile built on
PDF 1.4, needed only to unblock #140's recursive-validation case. This one matches what the library
already emits by default and is the standard actively recommended for new archival work. If only one
lands in v2.5, this is the one that changes what users can produce.
Advertising it
Do not claim PDF 2.0 support in the README, package descriptions or index.md until this validates
green. The library emits a 2.0 header today, which is not the same as conformance — and the gaps
above are exactly the sort a reader would hit. The claim should be gated on the same evidence every
other conformance claim in this repo is: both paths of every rule cross-validated against veraPDF in
CI, no rule left Deferred, and the catalog honest about anything Partial. When that holds, update
the package table, docs/architecture.md, and the Conformance package description together.
Acceptance
PdfConformance.PdfA4andPdfA4Fadded (public enum, additive, needs aPublicAPI.Unshipped.txt
entry).- Conformance output writes
%PDF-2.0for these profiles. ConformanceCataloggains the PDF/A-4 clause inventory;ConformanceCatalogTests' exact-set
assertion andDeferred == 0still hold.- Both paths of every rule cross-validated against veraPDF flavour
4(and4f) in CI. - A round-trip test: a document written as PDF/A-4 validates green against the oracle.
Activity
Tim81 commentedon Aug 28, 2026
Related: #223 adds an explicit
PdfVersionon the writer. The two touch the same header branch (PdfDocument.cs:600-604,:996,:1663), and #223 depends on the decision this issue makes about howConformancepins the version — a profile should set it, and an incompatible explicit value should throw rather than be silently overridden.Tim81 commentedon Aug 28, 2026
Related: #225 proposes inventorying ISO 32000-2's 79 level-1 normative references from
pdf-association/PDF2NormRefs(Apache-2.0, 1,173 documents) and gating the PDF 2.0 claim on that table rather than on the profile alone.Two things from that graph bear directly on this issue:
PdfA4/PdfA4Fand excluding4eis the right call.4profile stays the operative rule set here.Tim81 commentedon Aug 29, 2026
1. The rule count is wrong: 103 → 109
This issue says the
4profile carries 103 rules. Extracted from the pinned oracle(
PDFA-4.xmlinsidecli-1.30.2.jar, veraPDF 1.30.2), the actual counts are:4)4f)Note
4and4fhave the same count — the difference between them is rule content, notquantity, so 4F is a delta over 4 rather than a second rule set.
2.
PdfA4Fmoves out, to #246Rule 6.9/4 requires embedded files to carry
/AFRelationship— and/AFRelationshiphas zerooccurrences anywhere in this repository. So 4F cannot be cross-validated against output this library
is able to produce until the attachment work lands.
Keeping it here would either block v2.5 on the whole attachment milestone or ship a profile with no
producible fixture. This issue is now scoped to
PdfA4only; #246 ownsPdfA4Finv2.7 — Embedded files and associated files, after #243 (
/AFand/AFRelationship).The acceptance criteria above should drop the flavour
4fcross-validation; #246 carries it.3. Corroboration for two claims already made here
/Infounder rule 6.1.3/5 — Kernel: stop writing keys ISO 32000-2 deprecates under a 2.0 header #325 now tracks removing the deprecated/Infoentries generally,since ISO 32000-2 clause 0.3 deprecates the Info dictionary outright, not only for PDF/A-4. That
makes Kernel: stop writing keys ISO 32000-2 deprecates under a 2.0 header #325 a prerequisite of this issue rather than a parallel concern, and Info.Keywords is never mirrored into the XMP packet #199 a prerequisite of
both.
/Infodeprecated, thecatalog metadata stream is "the only recommended place in PDF 2.0" for title, author and producer.
4. On the PDF 2.0 claim
The note in this issue about not advertising PDF 2.0 support before this validates green still holds
and is now backed by a broader inventory — see the rewritten #225.