Validate PDF structure (PDF/UA, PDF/X-4)
validate_pdfValidate PDF structural conformance for PDF/UA-1 accessibility or PDF/X-4 print exchange, returning errors and warnings. Use it as a read-only gate before full preflight.
Instructions
Read-only structural gate; standard picks the rule set. 'pdf-ua-1' (default, ISO 14289-1) for Tagged PDF: /MarkInfo /Marked, /StructTreeRoot (+ /ParentTree), XMP /Metadata, /Lang, per-page MCID uniqueness — generate tagged input with pdfA (e.g. 'pdfa2u') first. 'pdf-x-4' (ISO 15930-7) for print exchange: /GTS_PDFX OutputIntent with a prtr ICC profile, TrimBox or ArtBox, every font embedded, no annotation / JavaScript / embedded file / transfer function — generate it with pdfx:'pdfx4'. Result { standard, valid, errors[], warnings[], summary } (+ caveats[] for PDF/X). Fast and structural only — NOT a reference validator or a certified preflight: fonts, colour and rendering are not checked (veraPDF for PDF/A and PDF/UA; callas pdfToolbox or Acrobat Preflight for PDF/X). Unparsable input → PDF_PARSE_FAILED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Optional dot-path projection applied to the structured result (e.g. ['valid']). Composes after verbosity. Unknown paths are omitted. | |
| standard | No | Rule set. 'pdf-ua-1' (default): PDF/UA accessibility structure (ISO 14289-1). 'pdf-x-4': PDF/X-4 print exchange (ISO 15930-7) — OutputIntent + prtr ICC profile, TrimBox, embedded fonts, no annotations / JavaScript / embedded files; structural prerequisites only, not a certified preflight (see caveats[]). | pdf-ua-1 |
| pdfBase64 | Yes | Base64-encoded PDF bytes to validate for structural conformance. | |
| verbosity | No | Response verbosity. 'full' (default) returns errors[] and warnings[]; 'summary' returns a token-frugal verdict { standard, valid, errorCount, warningCount, summary } and drops the message arrays. | full |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | No | True when no blocking structural violations were found. | |
| errors | No | Blocking conformance violations. Empty when valid is true. | |
| caveats | No | standard 'pdf-x-4' only: what a valid verdict does NOT establish. | |
| summary | No | Human-readable one-line summary of the result. | |
| standard | No | Conformance standard checked (ISO 14289-1 or ISO 15930-7). | |
| warnings | No | Non-blocking best-practice recommendations. | |
| errorCount | No | summary only: number of errors. | |
| warningCount | No | summary only: number of warnings. |