The veraPDF test corpus
The veraPDF corpus is the test material behind the PDF/A reference implementation: small, targeted files organised by the clause they exercise, with both conformant and non-conformant cases for each rule.
How it differs from Isartor
Any validator can reject everything. Isartor cannot detect that failure mode, because all of its files are supposed to be rejected. The veraPDF corpus can: for each clause it also contains a file that satisfies the clause and must be accepted.
In production that is the direction that costs you. A missed violation produces a document an archive later refuses. A false positive produces a support queue full of people whose perfectly good invoices were rejected. Worse, a conversion step that "fixes" a file that was never broken.
How gopdfrab uses it
The PDF/A-1b files are a conformance gate, run in CI on every change. The same files then go through the veraPDF binary and the two verdicts are compared, so a divergence is a build failure.
The corpus is also the tie-breaker for ambiguous clauses. Where the standard admits two readings, the default PDFA1B profile follows the corpus, and the stricter reading lives in Legacy1B.
Combined with Isartor it is the corpus the performance numbers are measured over. Timing the same files everyone validates keeps the comparison honest.
What a curated corpus still misses
Corpus files are small and well-formed apart from the one thing under test. Real input is not: truncated uploads, broken cross-reference tables, twenty-year-old scanner output, files encrypted with an empty owner password, and occasionally something built specifically to break a parser. Passing the corpus says nothing about surviving those.
That is a separate line of defence: fuzzing, damage recovery and resource limits. It is why a damaged document is reported rather than fatal, as described under typed errors.
Frequently asked
What is the veraPDF test corpus?
A clause-by-clause set of small PDF files maintained by the veraPDF project, with both passing and failing cases for the rules it validates. gopdfrab is tested against every one of the files covering PDF/A-1b.
How is it different from Isartor?
Isartor is a fixed set of files that are each invalid in one way, so it measures detection only. The veraPDF corpus pairs failing cases with passing ones per clause, so it also measures false positives, whether a valid document is wrongly rejected.
Does passing the corpus mean two validators agree?
It means they agree on the cases the corpus covers, which is a strong signal but not a proof. gopdfrab additionally runs a differential test against the veraPDF binary on the whole corpus, so a divergence fails CI rather than surfacing later.
Is the corpus enough to trust a validator?
It is necessary, not sufficient. Real documents are larger, stranger and more damaged than any curated corpus, which is why gopdfrab also fuzzes its parser and runs against production-shaped files.