THotPDF.RemoveLoadedNameTreeEntry Method
Removes every entry matching a key from a loaded name tree and reports whether anything was removed
Declaration
function RemoveLoadedNameTreeEntry(Tree: THPDFDictionaryObject;
const Key: AnsiString): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Tree | Name-tree root node, typically obtained from GetLoadedNameTree |
Key | Key string whose entries should be removed |
Return value
True when at least one matching key/value pair was removed, otherwise False
Usage notes
- Trees with /Kids are descended recursively (bounded at 64 levels), so an entry can be removed at any depth without knowing the tree layout
- The key and value objects of removed pairs are freed, and every touched node is marked dirty for the next save
- Duplicate keys left by malformed documents are all removed by a single call