Package org.openpdf.text.pdf
Class PdfDocument.PdfCatalog
java.lang.Object
org.openpdf.text.pdf.PdfObject
org.openpdf.text.pdf.PdfDictionary
org.openpdf.text.pdf.PdfDocument.PdfCatalog
- Enclosing class:
- PdfDocument
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
FieldsModifier and TypeFieldDescription(package private) PdfWriterThe writer writing the PDF for which we are creating this catalog object. -
Constructor Summary
ConstructorsConstructorDescriptionPdfCatalog(PdfIndirectReference pages, PdfWriter writer) Constructs aPdfCatalog. -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddNames(TreeMap<String, Object[]> localDestinations, Map<String, PdfIndirectReference> documentLevelJS, Map<String, PdfIndirectReference> documentFileAttachment, PdfWriter writer) Adds the names of the named destinations to the catalog.(package private) voidsetAdditionalActions(PdfDictionary actions) Sets the document level additional actions.(package private) voidsetOpenAction(PdfAction action) Adds an open action to the catalog.Methods inherited from class org.openpdf.text.pdf.PdfDictionary
clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, getKeysAndValues, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toStringMethods inherited from class org.openpdf.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
Field Details
-
writer
PdfWriter writerThe writer writing the PDF for which we are creating this catalog object.
-
-
Constructor Details
-
PdfCatalog
PdfCatalog(PdfIndirectReference pages, PdfWriter writer) Constructs aPdfCatalog.- Parameters:
pages- an indirect reference to the root of the document's Pages tree.writer- the writer the catalog applies to
-
-
Method Details
-
addNames
void addNames(TreeMap<String, Object[]> localDestinations, Map<String, PdfIndirectReference> documentLevelJS, Map<String, PdfIndirectReference> documentFileAttachment, PdfWriter writer) Adds the names of the named destinations to the catalog.- Parameters:
localDestinations- the local destinationsdocumentLevelJS- the javascript used in the documentdocumentFileAttachment- the attached fileswriter- the writer the catalog applies to
-
setOpenAction
Adds an open action to the catalog.- Parameters:
action- the action that will be triggered upon opening the document
-
setAdditionalActions
Sets the document level additional actions.- Parameters:
actions- dictionary of actions
-