concept destination in category itext

This is an excerpt from Manning's book iText in Action, Second Edition.
With the Anchor object and its alternatives, you’ve created internal and external links and destinations. The Chapter and Section classes were used to create bookmarks, but you’ll learn more about the outline tree and the LargeElement object in the chapters that follow. That’s also true for the Image object: you’ve learned how to use the most common methods, but you’ll learn more about the bits and bytes of images in chapter 10.
Table 13.2. Overview of the basic PDF objects
PDF object
iText object
Description
Boolean PdfBoolean This type is similar to the Boolean type in programming languages and can be true or false. Numeric object PdfNumber There are two types of numeric objects: integer and real. You’ve used them frequently to define coordinates, font sizes, and so on. String PdfString String objects can be written in two ways: Beginning with PDF 1.7, the type string is further qualified in the documentation as text string, PDFDocEncoded string, ASCII string, and byte string depending upon how the string is used in each particular context.
- As a sequence of literal characters enclosed in parentheses: ( )
- As hexadecimal data enclosed in angle brackets: < >
Name PdfName A name object is an atomic symbol uniquely defined by a sequence of characters. You’ve been using names as keys for dictionaries, to define a destination on a page, and so on. You can easily recognize them in a PDF file because they’re all introduced with a forward slash: /. Array PdfArray An array is a one-dimensional collection of objects, arranged sequentially between square brackets. You’ve used arrays to define the size of a page; for instance, [0 0 595 842]. Dictionary PdfDictionary A dictionary is an associative table containing pairs of objects known as dictionary entries. The key is always a name; the value can be (a reference to) any other object. The collection of pairs is enclosed by double angle brackets: << and >>. Stream PdfStream Like a string object, a stream is a sequence of bytes. The main difference is that a PDF consumer reads a string entirely, whereas a stream is best read incrementally. Strings are generally used for small pieces of data; streams are used for large amounts of data. Each stream consists of a dictionary followed by zero or more bytes bracketed between the keywords stream (followed by newline) and endstream. Null object PdfNull This type is similar to the null object in programming languages. Setting the value of a dictionary to null is equivalent to omitting the entry.
You’ve already worked with a number tree for page labels; now you’ll work with a name tree: an array with ordered pairs of strings and values. In the addKids() method, you use the title of the outlines as the key and the destination of the outline, an array, as the value. You add the name tree to the document with the method addPdfObject(). An indirect object will be created, and you’ll receive a PdfIndirectReference object that refers to this new object. You replace the /Names entry in the catalog with a new one that has a /Dests item. This /Dests item has a /Names entry referring to the newly created indirect object.