THotPDF.GetLoadedOutlineItem Method
Reads the title text and target page index of the top-level entry at the specified index in the outline (bookmark) of the loaded PDF document
Declaration
function GetLoadedOutlineItem(Index: Integer; out ATitle: AnsiString; out APageIndex: Integer): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Index | Zero-based index of the top-level outline entry; the valid range runs from 0 to GetLoadedOutlineCount - 1 |
ATitle | Output parameter, receives the bookmark title text string |
APageIndex | Output parameter, receives the zero-based index of the target page pointed to by the bookmark; if the bookmark target is not a page jump, it outputs -1 |
Return value
Returns True when the outline entry is read successfully
Usage notes
- When a bookmark title contains Unicode characters the return value is a UTF-8 or BOM-decoded string; confirm the target character set supports it before display
- Child bookmarks are not visited automatically; step into them via the outline dictionary when a full tree walk is needed
- This method only traverses top-level bookmarks; if child bookmarks need to be traversed, the First/Next linked list nodes in the bookmark dictionary must be accessed