THotPDF.InsertLoadedNameTreeEntry Method
Slips a key/value pair into a loaded name tree, keeping every leaf sorted as ISO 32000-1 7.9.6 requires
Declaration
procedure InsertLoadedNameTreeEntry(Tree: THPDFDictionaryObject;
const Key: AnsiString; Value: THPDFObject);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Tree | Root node of the name tree, normally the one handed back by GetLoadedNameTree |
Key | The entry's sorted key string |
Value | The PDF object kept for the key; the tree only takes charge of where the insertion sits, and the object remains part of the loaded graph |
Return value
This member gives back no value
Usage notes
- For a tree with /Kids the descent follows the /Limits of its nodes, widening the limits along the way so the new key is covered and viewers can carry on using binary search across the leaves
- Putting in a key that already exists swaps its value rather than adding a duplicate
- Every node along the descent path is marked dirty, so the next save or incremental update writes the change back