THotPDF.InsertLoadedNameTreeEntry Method
Inserts a key/value pair into a loaded name tree and keeps every leaf sorted per ISO 32000-1 7.9.6
Declaration
procedure InsertLoadedNameTreeEntry(Tree: THPDFDictionaryObject;
const Key: AnsiString; Value: THPDFObject);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Tree | Name-tree root node, typically obtained from GetLoadedNameTree |
Key | Sorted key string of the entry |
Value | PDF object stored for the key; the tree takes ownership of insertion positioning only, the object stays part of the loaded graph |
Return value
This member does not return a value
Usage notes
- A tree with /Kids is descended through the /Limits of its nodes, and the limits on the way are widened to cover the new key, so viewers keep using binary search over the leaves
- Inserting an existing key replaces its value instead of adding a duplicate
- Every node on the descent path is marked dirty, so the change is written back by the next save or incremental update