PDFium Delphi Component Docs

ValidatePdfUa2DocumentSemantics 函式

單元: PDFium
對攤平的 TPdfStructureElement 資料執行 ISO 14289-2 文件層級語意檢查

語法

function ValidatePdfUa2DocumentSemantics(const Elements: TPdfStructureElements): TPdfUaValidationIssues;

參數

ElementsTPdfStructureElements

傳回值

TPdfUaValidationIssues

說明

ValidatePdfUa2DocumentSemantics 僅從結構樹資料驗證 PDF/UA-2(ISO 14289-2)加標籤文件的文件層級結構語意,無須載入 pdfium.dll

它會驗證非空元素清單包含根 Document 元素,並回報每個 Note 元素,因為 ISO 14289-2 結構樹改用 FENote

FENote 元素必須帶有 ID 與一個 Reference 子項

每個父節點最多只能有一個 Caption 子項與一個 Title 子項

LI 元素必須恰好包含一個 Lbl 子項與一個 LBody 子項

沒有 Reference 子項的 TOCI 元素會以 pvuaiTocReferenceMissing 回報

所有其他違規都以 pvuaiDocumentSemanticInvalid 回報

備註

範例

Issues := ValidatePdfUa2DocumentSemantics(Pdf.StructureElements);

另請參閱

ValidatePdfUa2StructureElements, ValidatePdfUaStructureElements, TPdf.StructureElements, TPdf.ValidatePdfUa