Validation Policies and WTPDF

Validation policies add enforceable document requirements to the existing structural preflight engine and preserve the text, JSON, HTML, and CSV report formats

Built-in policies

GetBuiltInValidationPolicy recognises default, compact, strict, wtpdf-reuse, wtpdf-accessibility, wtpdf-validated-reuse, and wtpdf-validated-accessibility

The WTPDF policies enforce the machine-verifiable core requirements for PDF 2.0, a structure tree, a non-empty document language, XMP metadata with dc:title, embedded fonts, and the matching PDF Declaration, while accessibility policies also require DisplayDocTitle=true

These checks are a deterministic intake gate for the supported rules and do not replace a complete semantic WTPDF, PDF/UA-2, or ISO/TS 32005 validator

Declaration metadata

ReadWTPDFMetadata extracts reuse, accessibility, and validated declaration states plus claimBy, claimDate, claimCredentials, and claimReport from Catalog XMP

The reader accepts the current registry URIs and the slash form emitted by the original WTPDF 1.0 examples, but reports the current canonical URI form

Public support types

THPDFWTPDFConformanceLevel selects no WTPDF claim, reuse, or accessibility validation, while THPDFWTPDFMetadata returns the declarations and claim details found in XMP

THPDFValidationJob and THPDFValidationJobs describe ordered batch inputs, and THPDFValidationJobStatus, THPDFValidationJobResult, and THPDFValidationJobResults return ordered validation outcomes

THPDFValidationBatchOptions controls report format, worker and queue limits, fail-fast behaviour, and cancellation

THPDFMetadataFixMode selects inspection, additive repair, or synchronisation, and THPDFMetadataFixResult reports metadata validity and the number of changed properties

Bounded batch execution

RunValidationBatch validates independent files concurrently with caller-controlled worker and queue limits, preserves source order, supports fail-fast and cancellation, and records elapsed time plus source-aware error context for every job

A non-positive worker limit selects the active processor count and a non-positive queue limit selects four jobs per worker

Independent metadata repair

FixPDFMetadata uses mfmInspectOnly, mfmAddMissing, or mfmSynchronize independently of structural preflight repair

Add-missing mode preserves existing properties and creates a basic packet when metadata is absent, while synchronize mode rewrites the common Dublin Core, PDF, and XMP properties from the loaded Info dictionary and preserves unrelated RDF descriptions