property BookmarkChildren[const Bookmark: TBookmark]: TBookmarks; // read only
Indexed read-only property that returns the immediate child bookmarks of a given parent bookmark node
Requires Active to be True. Pass a parent TBookmark record taken from Bookmarks or from an earlier BookmarkChildren call; the result is an empty array when the bookmark has no children
The returned record is a snapshot of the value as it stood at the moment of the call; later edits to the document leave previously returned records untouched
/Outlines)HasBookmarkChildren[Bookmark] for a lightweight check before materialising the child arrayTBookmark carries Title, PageNumber, Destination, Action, IsOpen, DescendantCount and style/colour metadata
var
Items: TBookmarks;
begin
if Pdf1.Active then
begin
if Length(Pdf1.Bookmarks) > 0 then
Items := Pdf1.BookmarkChildren[Pdf1.Bookmarks[0]];
Memo1.Lines.Add('count: ' + IntToStr(Length(Items)));
end;
end;