PDFium Delphi Component 文件

BookmarkStyleFeaturesAvailable 函数

单元: PDFium
报告已加载的 pdfium.dll 是否导出了 FPDFBookmark_GetStyle

语法

function BookmarkStyleFeaturesAvailable: Boolean;

参数

无

返回值

Boolean

说明

BookmarkStyleFeaturesAvailable 在必要时加载所选的 PDFium 模块,并在可选的 FPDFBookmark_GetStyle 入口点已导出时返回 True

该导出存在时,Bookmarks、Bookmark、BookmarkChildren 和 BookmarkFrom 产出的每个 TBookmark 都会在其 Style 集合中携带大纲项的 /F 文本标志(ISO 32000-1 Table 153):bit 1 对应 posItalic,bit 2 对应 posBold

缺少该导出时,所有书签的 Style 集合都保持为空;书签读取的其余行为一概不变

备注

示例

if BookmarkStyleFeaturesAvailable and (posBold in Pdf.Bookmarks[0].Style) then
  TreeView1.Items[0].Font.Style := [fsBold];

参见

TPdf.Bookmarks, TPdf.Bookmark, AttachmentRelationshipFeaturesAvailable, BezierControlPointFeaturesAvailable