The PDF Arlington Model covers the requirements of PDF object model as specified in ISO 32000-2:2020 (PDF 2.0, including resolved errata) as well as some (but not all!) aspects from earlier Adobe PDF references and various extensions (identified by the predicate fn:Extension(...)
). It is based on its own formal grammar serialized as a set of TSV files (see also the Arlington Model Notes). References to Tables and clauses below all refer to ISO 32000-2:2020.
veraPDF adds the support for this model by translating TSV files into its own validation profile based on veraPDF formal grammar for validation rules.
This repository implements the Java-based utility performing this translation.
The Arlington PDF model utilizes an expanded set of types in order to more precisely define PDF objects and data integrity relationships. veraPDF fully supports this expanded set and implements certain additional checks. These checks include:
Exception: Caught unexpected runtime exception during validation caused by exception: Wrapp org.verapdf.exceptions.VeraPDFParserException: Error while parsing object X Y ... invalid pdf dictionary (object key - X Y obj, offset ZZZZ)
.dates
must be a valid PDF date stringrectangle
must be a PDF array with precisely 4 entriesmatrix
must be a PDF array with precisely 6 numeric entriesbitmask
must be a PDF integer objectstring-ascii
must contain only 7-bit ASCII characters (<= 0x7F)name-tree
is a complex data structure (see Table 36), internally comprising various PDF objects:
fn:Not(fn:IsPresent(Names))
.fn:Not(fn:IsPresent(fn:IsPresent(Names)))
fn:Not(fn:IsPresent(Kids))
.fn:Not(fn:IsPresent(fn:IsPresent(Kids)))
number-tree
is a complex data structure (see Table 37), internally comprising various PDF objects:
fn:Not(fn:IsPresent(Nums))
fn:Not(fn:IsPresent(fn:IsPresent(Nums)))
fn:Not(fn:IsPresent(Kids))
fn:Not(fn:IsPresent(fn:IsPresent(Kids))) && fn:ArraySortAscending(Nums,2)
Note however that veraPDF does not perform any checks against architectural limitations or previous limitations noted in older PDF specifications (such as assumptions about the size of integers, the length of PDF names or strings, etc).
The following Arlington predicates are not supported:
veraPDF adds extra logic to the Arlington model. Namely, it:
extends Arlington model for checking PDF Fields and Widgets by automatically generating new types AnnotWidgetField
, AnnotWidgetFieldTx
, AnnotWidgetFieldCh
, AnnotWidgetFieldBtn
, AnnotWidgetFieldSig
that represent merged Widget annotation and Form field dictionaries (ISO 32000-2, 12.5.6.19). See https://github.com/pdf-association/arlington-pdf-model/issues/28 for additional discussion.
includes fixes of some known Arlington model issues:
supports some future Arlington model predicates:
contains additional rule about PageLabel number tree. See https://github.com/pdf-association/arlington-pdf-model/issues/118
custom structure attribute names of the standard structure attribute owners (Table 376) defined by external specifications (such as HTML-3.20
, HTML-4.01
, CSS-1
, CSS-2
, etc.) will be reported as deviations (i.e. veraPDF does not implement an implicit understanding of those external specifications)
the PDF Metadata (clause 14.3) and Associated Files (clause 14.13) features are documented as being permitted on any PDF object, however ISO 32000-2:2020 only formally documents the presence of the Metadata and AF keys on a few specific objects. Because the Arlington model accurately reflects the specification as written, it only defines support for those explicit objects in the TSV data. As a result, veraPDF will report deviations when a Metadata or AF keys occurs in other objects, which may or may not be an issue.
veraPDF does not check object numbers against the trailer Size entry and thus will not report object numbers that are invalid (see Table 15) - this is not correct according to the PDF specification.
veraPDF only operates as a "PDF 1.5 processor" and will always process both conventional cross-reference sections and all cross-reference streams that are present in hybrid-reference PDF files.
the set of enabled extensions in the Arlington model (predicate fn:Extension(...)
) will influence the deviations reported by veraPDF. Currently this is configurable in veraPDF via the CLI and GUI, but not yet the REST implementation.