class HexaPDF::NameTreeNode

Included Modules

Implementation of PDF name trees.

Name trees are used in a similar fashion as dictionaries, however, the key in a name tree is always a string instead of a symbol. Another difference is that the keys in a name tree are always sorted to allow fast lookup of a specific key.

A name tree consists of one or more NameTreeNodes. If there is only one node, it contains all stored associations in the /Names entry. Otherwise the root node needs to have a /Kids entry that points to one or more intermediate or leaf nodes. An intermediate node contains a /Kids entry whereas a leaf node contains a /Names entry.

Since this is a complex structure that must follow several restrictions, it is not advised to build a name tree manually. Instead, use the provided convenience methods (see HexaPDF::Utils::SortedTreeNode) to add or retrieve entries. They ensure that the name tree stays valid.

See: PDF1.7 s7.9.6

Field Definitions

NameType/Allowed ValuesRequiredDefault Value
KidsHexaPDF::PDFArray or Arrayfalsenil
NamesHexaPDF::PDFArray or Arrayfalsenil
LimitsHexaPDF::PDFArray or Arrayfalsenil