THotPDF.SetLoadedOutlineOpen Method
Sets the default expand/collapse state for a specified bookmark (outline node) in the loaded document. When the document is opened by a reader, the child nodes of this bookmark will decide whether to expand and be visible based on this setting
Declaration
procedure SetLoadedOutlineOpen(Index: Integer; AOpen: Boolean);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Index | The index number (zero-based) of the target bookmark or outline node whose state is to be set |
AOpen | True to show the item's children, False to fold them away again |
Usage notes
This member returns no value
Usage notes
- Index numbers top-level outline items from 0
- An outline item's open state is the sign of its /Count entry (ISO 32000-1 12.3.3); the method sets that sign and refreshes the counts across the whole outline, so the outline root keeps hold of the number of items visible when the document opens
- An item with no children has nothing to expand, so it is left as it is — save for taking out an /Open key which versions before 2.765.2 wrote by mistake