PDFium Delphi Component Docs

ValidatePdfUa2AssociatedFileSemantics function

Unit: PDFium
Validates relationship, ownership, reading order, and discoverability of PDF/UA-2 associated files

Syntax

function ValidatePdfUa2AssociatedFileSemantics(
  const Elements: TPdfStructureElements): TPdfUaValidationIssues;

Parameters

ElementsTPdfStructureElements

Return Value

TPdfUaValidationIssues

Description

ValidatePdfUa2AssociatedFileSemantics examines every element whose HasAssociatedFile flag is set

The AssociatedFileRelationship must be one of Source, Data, Alternative, Supplement, EncryptedPayload, FormData, or Schema, and AssociatedFileDescription must be non-empty, otherwise pvuaiAssociatedFileSemanticInvalid is reported

The file must be owned by the catalogue or by the structure tree, and a file registered in the embedded-files name tree must also be declared in the catalogue, otherwise pvuaiAssociatedFileOwnershipInvalid is reported

A structure-declared file must carry a non-negative AssociatedFileReadingOrderIndex that is unique and does not decrease across structure declarations, otherwise pvuaiAssociatedFileReadingOrderInvalid is reported

The file must be discoverable, meaning catalogue-declared or structure-declared with a valid reading order index, otherwise pvuaiAssociatedFileDiscoverabilityInvalid is reported

Remarks

Example

FileIssues := ValidatePdfUa2AssociatedFileSemantics(Pdf.StructureElements);

See Also

ValidatePdfUa2StructureElements, ValidatePdfUa2FormulaSemantics, TPdf.StructureElements, TPdf.ValidatePdfUa