PDFium Delphi Component Docs

ValidatePdfUaRoleMapUsage function

Unit: PDFium
Validates that every custom structure type maps to a standard ISO 32000-1 type without cyclic references

Syntax

function ValidatePdfUaRoleMapUsage(const Elements: TPdfStructureElements; const RoleMapKeys, RoleMapVals: TPdfUaNameArray): TPdfUaValidationIssues;

Parameters

ElementsTPdfStructureElements
RoleMapKeysTPdfUaNameArray
RoleMapValsTPdfUaNameArray

Return Value

TPdfUaValidationIssues

Description

ValidatePdfUaRoleMapUsage performs a §7.1 RoleMap usage cross-check for a document

Every non-standard structure type actually used in the structure elements must resolve through the key/value pairs in the RoleMap to an ISO 32000-1 §14.8.4 standard type

The document parser accepts direct names, direct arrays, and exact-generation indirect references to name or array objects; an array resolves through its first standard structure type, while dangling references, malformed objects, and cycles remain unresolved

This is a pure data routine that requires no pdfium.dll and can be unit-tested with synthetic arrays

Remarks

Example

Issues := ValidatePdfUaRoleMapUsage(Pdf.StructureElements, Keys, Values);

See Also

TPdf.ValidatePdfUa, ValidatePdfUaStructureElements, ValidatePdfUaPageContentTagging