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