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
Declaração
function ValidatePDFUA2Structure(
const Options: THPDFUA2ValidationOptions;
out Issues: THPDFUA2ValidationIssues): boolean; overload;
function ValidatePDFUA2Structure(
const Options: THPDFUA2ValidationOptions;
out Findings: THPDFComplianceFindings): boolean; overload;
Unidade
HPDFDoc
Validation options
Use THPDFUA2ValidationOptions.Default for strict generation validation or adjust individual semantic policies for intake diagnostics
| Campo | Finalidade |
|---|---|
HeadingPolicy | Ignores, diagnoses, or rejects skipped heading levels |
AllowDocumentFragmentHeadingStarts | Resets heading context inside DocumentFragment |
RequireListLabels | Requires one Lbl for each numbered list item |
RequireExplicitTableHeaderAssociations | Reports data cells that depend only on scope inference |
CheckListSemantics | Checks numbering, continuation chains, captions, labels, bodies, and direct real-content placement |
CheckTableSemantics | Checks bounded grid geometry, row groups, spans, scopes, and table-local header associations |
CheckRubyWarichuSequences | Checks the exact direct-child sequences required for Ruby and Warichu |
CheckPronunciationHints | Checks pronunciation entry types and indirect embedded PLS lexicons |
RequireStructureAssociatedFiles | Requires every catalog associated file to be reachable from structure |
RequireFormulaTextAlternative | Requires Alt, ActualText, or associated MathML for formulas |
MaxObjects | Bounds indirect-object scanning and defaults to 1,000,000 objects |
MaxIssues | Bounds retained diagnostics and defaults to 256 issues |
Valor devolvido
Devolve True apenas quando não uisError permanece nenhum diagnóstico
Diagnósticos
THPDFUA2IssueSeverity distinguishes warnings and errors, while 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
- Validation never creates a missing
StructTreeRootor namespace dictionary - Namespace-aware role maps are resolved transitively with cycle and depth detection
- Structure elements, parent backlinks, attributes, annotations, associated files, headings, lists, tables, Ruby, Warichu, pronunciation hints, formulas, and MathML are checked in one bounded pass
- Table diagnostics distinguish invalid spans, cell intersections, irregular rows and row groups, cross-table IDs, duplicate or cyclic header references, and missing algorithmic associations
- List diagnostics distinguish invalid numbering, unwrapped content, label and body structure, ordered same-level continuation references, and continuation cycles
- Expanded table geometry shares the
MaxObjectsbound and fails closed withua2.table.limit.cells ua2.limit.objectsfails closed before scanning an oversized graph
Machine-readable findings
O 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 estado de reparação