com.lowagie.text.pdf

Class PdfDocument.PdfCatalog

static class PdfDocument.PdfCatalog extends PdfDictionary

PdfCatalog is the PDF Catalog-object.

The Catalog is a dictionary that is the root node of the document. It contains a reference to the tree of pages contained in the document, a reference to the tree of objects representing the document's outline, a reference to the document's article threads, and the list of named destinations. In addition, the Catalog indicates whether the document's outline or thumbnail page images should be displayed automatically when the document is viewed and whether some location other than the first page should be shown when the document is opened.
In this class however, only the reference to the tree of pages is implemented.
This object is described in the 'Portable Document Format Reference Manual version 1.3' section 6.2 (page 67-71)

Field Summary
PdfWriterwriter
The writer writing the PDF for which we are creating this catalog object.
Constructor Summary
PdfCatalog(PdfIndirectReference pages, PdfWriter writer)
Constructs a PdfCatalog.
Method Summary
voidaddNames(TreeMap localDestinations, HashMap documentLevelJS, HashMap documentFileAttachment, PdfWriter writer)
Adds the names of the named destinations to the catalog.
voidsetAdditionalActions(PdfDictionary actions)
Sets the document level additional actions.
voidsetOpenAction(PdfAction action)
Adds an open action to the catalog.

Field Detail

writer

PdfWriter writer
The writer writing the PDF for which we are creating this catalog object.

Constructor Detail

PdfCatalog

PdfCatalog(PdfIndirectReference pages, PdfWriter writer)
Constructs a PdfCatalog.

Parameters: pages an indirect reference to the root of the document's Pages tree. writer the writer the catalog applies to

Method Detail

addNames

void addNames(TreeMap localDestinations, HashMap documentLevelJS, HashMap documentFileAttachment, PdfWriter writer)
Adds the names of the named destinations to the catalog.

Parameters: localDestinations the local destinations documentLevelJS the javascript used in the document documentFileAttachment the attached files writer the writer the catalog applies to

setAdditionalActions

void setAdditionalActions(PdfDictionary actions)
Sets the document level additional actions.

Parameters: actions dictionary of actions

setOpenAction

void setOpenAction(PdfAction action)
Adds an open action to the catalog.

Parameters: action the action that will be triggered upon opening the document