PDFium Delphi Component Docs

ClassifyStructType 函式

單元: PDFium
將結構元素類型名稱分類為 TPdfContentFragmentKind,並可傳回標題層級

語法

function ClassifyStructType(const TypeName: WString; out HeadingLevel: Integer): TPdfContentFragmentKind;

參數

TypeNameWString
HeadingLevelInteger

傳回值

TPdfContentFragmentKind:型別未加標記或僅經啟發式對應時為 cfPlain,P 對應 cfParagraph,H 與 H1..H6 對應 cfHeading,Figure 與 Formula 對應 cfFigure,LI、Lbl 與 LBody 對應 cfListItem,TD 與 TH 對應 cfTableCell,Caption 對應 cfCaption,Link 與 Reference 對應 cfLink,其餘有標記的型別則對應 cfOther

說明

ClassifyStructType 會將 PDF 結構元素的 /S 名稱對應到 TPdf.ReadableContent 使用的可讀內容片段種類

可將結構元素類型名稱分類為 TPdfContentFragmentKind 與選擇性的標題層級

備註

範例

Kind := ClassifyStructType(TypeName, HeadingLevel);

另請參閱

TPdf.ReadableContent, TPdf.StructureElements, ValidatePdfUaStructureElements