THotPDF.ValidatePDFUA2Structure Method

Runs bounded PDF/UA-2 structure validation over a producer or loaded object graph and returns stable structured diagnostics without mutating the document

Declaration

function ValidatePDFUA2Structure(
  const Options: THPDFUA2ValidationOptions;
  out Issues: THPDFUA2ValidationIssues): boolean; overload;

function ValidatePDFUA2Structure(
  const Options: THPDFUA2ValidationOptions;
  out Findings: THPDFComplianceFindings): boolean; overload;

Unit

HPDFDoc

Validation options

Use THPDFUA2ValidationOptions.Default for strict generation validation or adjust individual semantic policies for intake diagnostics

FieldPurpose
HeadingPolicyIgnores, diagnoses or refuses skipped heading levels
AllowDocumentFragmentHeadingStartsResets heading context inside DocumentFragment
CheckDocumentSemanticsChecks Catalog language, metadata, displayed title, optional content and embedded files
CheckHumanReadableStringsRefuses Unicode private-use characters in human-readable strings
CheckAnnotationSemanticsChecks page tab order, annotation ownership, roles, flags, descriptions and appearance streams
CheckFormSemanticsChecks AcroForm fields, widgets, labels, actions, options and rich values
CheckNavigationSemanticsChecks structure destinations, outlines and nested page-label number trees
RequireListLabelsRequires one Lbl for each numbered list item
RequireExplicitTableHeaderAssociationsReports data cells that depend only on scope inference
CheckListSemanticsChecks numbering, continuation chains, captions, labels, bodies and direct real-content placement
CheckTableSemanticsChecks bounded grid geometry, row groups, spans, scopes and table-local header associations
CheckRubyWarichuSequencesChecks the exact direct-child sequences required for Ruby and Warichu
CheckPronunciationHintsChecks pronunciation entry types and indirect embedded PLS lexicons
RequireStructureAssociatedFilesRequires every catalogue associated file to be reachable from structure
RequireFormulaTextAlternativeRequires Alt, ActualText or associated MathML for formulas
MaxObjectsBounds indirect-object scanning and defaults to 1,000,000 objects
MaxIssuesBounds retained diagnostics and defaults to 256 issues

Return value

Returns True only when no uisError diagnostic remains

Diagnostics

THPDFUA2IssueSeverity distinguishes warnings and errors, whilst each THPDFUA2ValidationIssue carries a stable namespaced code, applicable clause, object path, object number, zero-based page index when known and human-readable message in the THPDFUA2ValidationIssues array

Machine-readable findings

The THPDFComplianceFindings overload maps the same bounded validation pass into the shared compliance model without changing validation order or mutating the graph

Each finding identifies PDF/UA-2, severity, rule ID, standard clause, path, object number, page index, message and a crsNotAttempted repair state

Related APIs