Skip to content

Latest commit

 

History

History
59 lines (47 loc) · 3.08 KB

File metadata and controls

59 lines (47 loc) · 3.08 KB

Conformance

A PDF library's claims are only as good as the independent tools that verify them. Every push to main regenerates a set of reference documents and validates them with third-party validators in the conformance workflow. Per-run reports (validator output, rendered pages, diffs) are attached to each workflow run as artifacts; the summary tables are printed on the run's summary page.

What is validated, and by what

Check Standard Tool References
PDF/A validation ISO 19005 veraPDF — the industry-standard open-source validator PDF/A-1b, 1a, 2b, 2u, 3b
PDF/X structure ISO 15930 Ghostscript render (-dPDFSTOPONERROR) + byte-level assertions (OutputIntent /GTS_PDFX, CMYK profile and RGB-operator ban for X-1a, Info keys, trailer /ID, TrimBox/ArtBox per page, no encryption) PDF/X-1a, X-3, X-4
Visual regression poppler pdftoppm render diffed against committed golden PNGs (ImageMagick, 5% fuzz, ≤0.5% differing pixels) reference pages
PKCS#7 signatures OpenSSL CLI: openssl cms -verify over the exact /ByteRange bytes; tampering must break verification test suite (SignatureOpenSslTest)
Torture set 11 worst-case documents (tables, Arabic/CJK, barcodes, charts, SVG, forms, signature, PDF/A, merge) rendered by poppler and Ghostscript; manual cross-viewer checklist in VIEWER-MATRIX.md examples/torture/

The reference documents are not toy files: they embed subsetted TrueType fonts, Cyrillic text, bold runs and tables, and are generated by scripts/conformance/generate.php with the sRGB2014 ICC profile vendored in resources/icc/.

Reproduce locally

bash scripts/fetch-fonts.sh
php scripts/conformance/generate.php

# PDF/A — requires veraPDF (https://verapdf.org, or `brew install verapdf`)
bash scripts/conformance/verapdf.sh

# PDF/X — requires Ghostscript
python3 scripts/conformance/pdfx-check.py

# Visual regression — requires poppler + ImageMagick
bash scripts/conformance/visual-check.sh

# Signatures — part of the regular test suite
vendor/bin/phpunit tests/Pdf/SignatureOpenSslTest.php

Known boundaries

  • PDF/X-1a uses the CGATS21_CRPC1 CMYK characterization profile, fetched on demand from the ICC registry (scripts/fetch-icc.sh) — at ~3.7 MB it is cached, not vendored.
  • PDF/X preflight depth: full ISO 15930 preflight is the domain of commercial tools (callas pdfToolbox, Acrobat Preflight). The CI checks cover the machine-checkable structural requirements; they are necessary, not sufficient, conditions.
  • veraPDF emits "Nested MCID" warnings (not violations) for tagged documents; tightening the tagged emission is tracked as future work.
  • Signature verification by the OpenSSL CLI proves cryptographic correctness over /ByteRange; the Acrobat signature panel is verified manually as part of the viewer matrix.