property Bookmark[const Title: WString]: TBookmark; // read only
The PDF outline (also called document outline or "bookmarks" in viewers like Acrobat) is a hierarchical tree of named entries that the user navigates from the side panel. Each entry has a title, an optional destination or action, and zero or more children. PDFiumVCL flattens the tree into a sequence of TBookmark records that retain the underlying FPDF_BOOKMARK handle plus pre-resolved title, target page number, action type, and action target.
The string-indexed Bookmark form performs a case-sensitive search across the entire outline tree (depth-first) and returns the first matching node. The returned record has Handle = nil and PageNumber = 0 when no entry with that title exists — check Handle before navigating.
Use Bookmarks to enumerate every node in document order, BookmarkChildren to walk one level of nesting, and BookmarkFrom to convert a raw handle (for example from a viewer-side click event) back to a populated record.
| Title | WString. The full bookmark title to match. Comparison is case-sensitive and exact (no substring or wildcard matching). Whitespace and punctuation in the title must be reproduced exactly as stored in the PDF outline. |
Action field on the returned record indicates how the bookmark behaves when activated — acGoto jumps to ActionPageNumber inside the document, acGotoRemote targets another PDF file, acUri opens a URL, acLaunch runs an external file, and acUnsupported means PDFium could not interpret the destination.0.
var
Bm: TBookmark;
begin
Pdf1.LoadFromFile('specification.pdf');
Bm := Pdf1.Bookmark['Chapter 5: Annotations'];
if Bm.Handle <> nil then
begin
case Bm.Action of
acGoto: Pdf1.PageNumber := Bm.ActionPageNumber;
acUri: ShowMessage('URL bookmark');
acGotoRemote: ShowMessage('External PDF target');
end;
end
else
ShowMessage('No bookmark with that title.');
end;