PDF/A Validation Rules

Validation Rule Classes

PDF/A compliance validation is implemented through rule classes that extend PdfARule. Each rule class checks a specific aspect of the document for conformance with the target archival format.

ActionRules

ActionRules validates that action dictionaries in catalog, page, and widget entries comply with PDF/A restrictions. JavaScript actions, named actions, and certain trigger actions are forbidden in PDF/A documents.

ActionRules rules = new ActionRules();
rules.validate(parser, format, result);

AnnotationRules

AnnotationRules checks that annotation types and their properties conform to the PDF/A specification. Certain annotation types are not permitted in PDF/A, and widget annotations have additional constraints.

PdfARule

PdfARule is the abstract base class for all validation rule implementations. Concrete rule classes implement validate(parser, format, result) to check their specific area of PDF/A compliance and append any violations to the PdfAValidationResult.

Workflow

  1. Run ActionRules.validate() and AnnotationRules.validate()
  2. Inspect the PdfAValidationResult for violations
  3. Apply corresponding fix classes from PDF/A Fixes
  4. Re-validate to confirm compliance

See Also