property Bookmarks: TBookmarks; // read only
This read-only property returns the document outline as an array of TBookmark snapshots
Each record includes the direct Destination, action type, action destination or URI/file path, one-based target page, open state, descendant count, and optional bookmark colour
Requires Active to be True; use BookmarkChildren to enumerate one node’s immediate children
Destination describes a direct bookmark target while ActionDestination describes the target carried by a GoTo actionIsOpen reflects the sign of the PDF outline count and DescendantCount exposes its absolute descendant totalActionPath contains the decoded URI or file path for URI, GoToR, and Launch actionsHasColor distinguishes an explicit bookmark colour from the default valueStyle holds the outline item's posItalic and posBold text flags when the loaded pdfium.dll exports FPDFBookmark_GetStyle (see BookmarkStyleFeaturesAvailable); otherwise the set stays empty
var
Items: TBookmarks;
begin
if Pdf1.Active then
begin
Items := Pdf1.Bookmarks;
Memo1.Lines.Add('count: ' + IntToStr(Length(Items)));
end;
end;