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 表示默认展开其子节点;False 表示默认折叠。 |
Usage notes
- 该设置直接修改底层书签树的结构标志(Count 属性的正负控制),必须保存文档后方可生效。
- Before traversing and modifying, please check the number of bookmarks to avoid exceptions caused by operating on non-existent nodes.