public class Catalog extends Dictionary
The Catalog object represents the root of a PDF document's
object heirarchy. The Catalog is located by means of the
Root entry in the trailer of the PDF file. The catalog contains
references to other objects defining the document's contents, outline, names,
destinations, and other attributes.
The Catalog class can be accessed from the Document
class for convenience, but can also be accessed via the PTrailer class.
Useful information about the document can be extracted from the Catalog
Dictionary, such as PDF version information and Viewer Preferences. All
Catalog dictionary properties can be accesed via the getEntries method.
See section 3.6.1 of the PDF Reference version 1.6 for more information on
the properties available in the Catalog Object.
| Modifier and Type | Field and Description |
|---|---|
static Name |
ACRO_FORM_KEY |
static Name |
COLLECTION_KEY |
static Name |
DESTS_KEY |
static Name |
METADATA_KEY |
static Name |
NAMES_KEY |
static Name |
OCPROPERTIES_KEY |
static Name |
OUTLINES_KEY |
static Name |
PAGELAYOUT_KEY |
static Name |
PAGEMODE_KEY |
static Name |
PAGES_KEY |
static Name |
TYPE |
static Name |
VIEWERPREFERENCES_KEY |
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY| Constructor and Description |
|---|
Catalog(Library l,
java.util.HashMap<java.lang.Object,java.lang.Object> h)
Creates a new instance of a Catalog.
|
| Modifier and Type | Method and Description |
|---|---|
NamedDestinations |
getDestinations()
Gets a dictionary of names and corresponding destinations.
|
InteractiveForm |
getInteractiveForm()
Gets the interactive form object that contains the form widgets for the given PDF.
|
Stream |
getMetaData()
A metadata stream that shall contain metadata for the document.
|
Names |
getNames()
Gets the document's Names dictionary.
|
OptionalContent |
getOptionalContent()
Gets the the optional content properties dictionary if present.
|
Outlines |
getOutlines()
Gets the Outlines Dictionary that is the root of the document's outline
hierarchy.
|
PageTree |
getPageTree()
Gets PageTree node that is the root of the document's page tree.
|
ViewerPreferences |
getViewerPreferences()
Gets a dictionary of keys and corresponding viewer preferences
This can be used to pull information based on the PDF specification,
such as HideToolbar or FitWindow
|
void |
init()
Initiate the PageTree.
|
java.lang.String |
toString()
Returns a summary of the Catalog dictionary values.
|
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReferencepublic static final Name TYPE
public static final Name DESTS_KEY
public static final Name VIEWERPREFERENCES_KEY
public static final Name NAMES_KEY
public static final Name OUTLINES_KEY
public static final Name OCPROPERTIES_KEY
public static final Name PAGES_KEY
public static final Name PAGELAYOUT_KEY
public static final Name PAGEMODE_KEY
public static final Name ACRO_FORM_KEY
public static final Name COLLECTION_KEY
public static final Name METADATA_KEY
public Catalog(Library l, java.util.HashMap<java.lang.Object,java.lang.Object> h)
l - document library.h - Catalog dictionary entries.public void init()
init in class Dictionarypublic PageTree getPageTree()
Pagepublic Outlines getOutlines()
OutlineItempublic Names getNames()
public NamedDestinations getDestinations()
public ViewerPreferences getViewerPreferences()
public OptionalContent getOptionalContent()
public Stream getMetaData()
public InteractiveForm getInteractiveForm()
public java.lang.String toString()
toString in class Dictionary