org.pdfbox.pdmodel
Class PDDocumentCatalog

java.lang.Object
  extended by org.pdfbox.pdmodel.PDDocumentCatalog
All Implemented Interfaces:
COSObjectable

public class PDDocumentCatalog
extends Object
implements COSObjectable

This class represents the acroform of a PDF document.

Version:
$Revision: 1.16 $
Author:
Ben Litchfield (ben@benlitchfield.com)

Constructor Summary
PDDocumentCatalog(PDDocument doc)
          Constructor.
PDDocumentCatalog(PDDocument doc, COSDictionary rootDictionary)
          Constructor.
 
Method Summary
 PDAcroForm getAcroForm()
          This will get the documents acroform.
 PDDocumentCatalogAdditionalActions getActions()
           
 List getAllPages()
          The PDF document contains a hierarchical structure of PDPageNode and PDPages, which is mostly just a way to store this information.
 COSDictionary getCOSDictionary()
          Convert this standard java object to a COS object.
 COSBase getCOSObject()
          Convert this standard java object to a COS object.
 PDDocumentOutline getDocumentOutline()
          Get the outline associated with this document or null if it does not exist.
 PDMarkInfo getMarkInfo()
          Get info about doc's usage of tagged features.
 PDMetadata getMetadata()
          Get the metadata that is part of the document catalog.
 PDDocumentNameDictionary getNames()
           
 PDAction getOpenAction()
          Get the Document Open Action for this object.
 PDPageNode getPages()
          This will get the root node for the pages.
 List getThreads()
          Get the list threads for this pdf document.
 PDViewerPreferences getViewerPreferences()
          Get the viewer preferences associated with this document or null if they do not exist.
 void setActions(PDDocumentCatalogAdditionalActions actions)
          Set the additional actions for the document.
 void setDocumentOutline(PDDocumentOutline outlines)
          Set the document outlines.
 void setMarkInfo(PDMarkInfo markInfo)
          Set information about the doc's usage of tagged features.
 void setMetadata(PDMetadata meta)
          Set the metadata for this object.
 void setNames(PDDocumentNameDictionary names)
          Set the names dictionary for the document.
 void setOpenAction(PDAction action)
          Set the Document Open Action for this object.
 void setThreads(List threads)
          Set the list of threads for this pdf document.
 void setViewerPreferences(PDViewerPreferences prefs)
          Set the viewer preferences.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDDocumentCatalog

public PDDocumentCatalog(PDDocument doc)
Constructor.

Parameters:
doc - The document that this catalog is part of.

PDDocumentCatalog

public PDDocumentCatalog(PDDocument doc,
                         COSDictionary rootDictionary)
Constructor.

Parameters:
doc - The document that this catalog is part of.
rootDictionary - The root dictionary that this object wraps.
Method Detail

getCOSObject

public COSBase getCOSObject()
Convert this standard java object to a COS object.

Specified by:
getCOSObject in interface COSObjectable
Returns:
The cos object that matches this Java object.

getCOSDictionary

public COSDictionary getCOSDictionary()
Convert this standard java object to a COS object.

Returns:
The cos object that matches this Java object.

getAcroForm

public PDAcroForm getAcroForm()
This will get the documents acroform. This will return null if no acroform is part of the document.

Returns:
The documents acroform.

getPages

public PDPageNode getPages()
This will get the root node for the pages.

Returns:
The parent page node.

getAllPages

public List getAllPages()
The PDF document contains a hierarchical structure of PDPageNode and PDPages, which is mostly just a way to store this information. This method will return a flat list of all PDPage objects in this document.

Returns:
A list of PDPage objects.

getViewerPreferences

public PDViewerPreferences getViewerPreferences()
Get the viewer preferences associated with this document or null if they do not exist.

Returns:
The document's viewer preferences.

setViewerPreferences

public void setViewerPreferences(PDViewerPreferences prefs)
Set the viewer preferences.

Parameters:
prefs - The new viewer preferences.

getDocumentOutline

public PDDocumentOutline getDocumentOutline()
Get the outline associated with this document or null if it does not exist.

Returns:
The document's outline.

setDocumentOutline

public void setDocumentOutline(PDDocumentOutline outlines)
Set the document outlines.

Parameters:
outlines - The new document outlines.

getThreads

public List getThreads()
Get the list threads for this pdf document.

Returns:
A list of PDThread objects.

setThreads

public void setThreads(List threads)
Set the list of threads for this pdf document.

Parameters:
threads - The list of threads, or null to clear it.

getMetadata

public PDMetadata getMetadata()
Get the metadata that is part of the document catalog. This will return null if there is no meta data for this object.

Returns:
The metadata for this object.

setMetadata

public void setMetadata(PDMetadata meta)
Set the metadata for this object. This can be null.

Parameters:
meta - The meta data for this object.

setOpenAction

public void setOpenAction(PDAction action)
Set the Document Open Action for this object.

Parameters:
action - The action you want to perform.

getOpenAction

public PDAction getOpenAction()
Get the Document Open Action for this object.

Returns:
The action to perform when the document is opened.

getActions

public PDDocumentCatalogAdditionalActions getActions()
Returns:
The Additional Actions for this Document

setActions

public void setActions(PDDocumentCatalogAdditionalActions actions)
Set the additional actions for the document.

Parameters:
actions - The actions that are associated with this document.

getNames

public PDDocumentNameDictionary getNames()
Returns:
The names dictionary for this document or null if none exist.

setNames

public void setNames(PDDocumentNameDictionary names)
Set the names dictionary for the document.

Parameters:
names - The names dictionary that is associated with this document.

getMarkInfo

public PDMarkInfo getMarkInfo()
Get info about doc's usage of tagged features. This will return null if there is no information.

Returns:
The new mark info.

setMarkInfo

public void setMarkInfo(PDMarkInfo markInfo)
Set information about the doc's usage of tagged features.

Parameters:
markInfo - The new MarkInfo data.


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.