class PDF::NameTree

Overview

A name tree serves a similar purpose to a dictionary—associating keys and values—but by different means. A name tree differs from a dictionary in the following important ways:

A name tree is constructed of nodes, each of which is a dictionary object. Table 3.22 shows the entries in a node dictionary. The nodes are of three kinds, depending on the specific entries they contain. The tree always has exactly one root node, which contains a single entry: either Kids or Names but not both. If the root node has a Names entry, it is the only node in the tree. If it has a Kids entry, then each of the remaining nodes is either an intermediate node, containing a Limits entry and a Kids entry, or a leaf node, containing a Limits entry and a Names entry.

Included Modules

Defined in:

pdf/data/nametree.cr

Constructors

Instance Method Summary

Instance methods inherited from module PDF::Renderable

render_to_pdf(io : IO) : IO render_to_pdf

Constructor Detail

def self.new(type : PDF::NameTree::Type, kids : Nil | Array(PDF::NameTree), names : Nil | Array(Tuple(String, PDF::PdfObj))) #

[View source]

Instance Method Detail

def limits : Array(String) | Nil #

Limits array (Intermediate and leaf nodes only; required) An array of two strings, specifying the (lexically) least and greatest keys included in the Names array of a leaf node or in the Names arrays of any leaf nodes that are descendants of an intermediate node.


[View source]
def render_to_pdf(io : IO) : IO #

for mixing-in module Renderable


[View source]