public class PDDocumentCatalog extends Object implements COSObjectable
Constructor and Description |
---|
PDDocumentCatalog(PDDocument doc)
Constructor.
|
PDDocumentCatalog(PDDocument doc,
COSDictionary rootDictionary)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addOutputIntent(PDOutputIntent outputIntent)
Add an OutputIntent to the list.
|
PDPageDestination |
findNamedDestinationPage(PDNamedDestination namedDest)
Find the page destination from a named destination.
|
PDAcroForm |
getAcroForm()
Get the documents AcroForm.
|
PDDocumentCatalogAdditionalActions |
getActions() |
COSDictionary |
getCOSObject()
Convert this standard java object to a COS object.
|
PDDocumentNameDestinationDictionary |
getDests() |
PDDocumentOutline |
getDocumentOutline()
Get the outline associated with this document or null if it does not exist.
|
String |
getLanguage()
Returns the language for the document, or null.
|
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() |
PDOptionalContentProperties |
getOCProperties()
Get the optional content properties dictionary associated with this document.
|
PDDestinationOrAction |
getOpenAction()
Get the Document Open Action for this object.
|
List<PDOutputIntent> |
getOutputIntents()
Get the list of OutputIntents defined in the document.
|
PDPageLabels |
getPageLabels()
Returns the page labels descriptor of the document.
|
PageLayout |
getPageLayout()
Returns the page layout.
|
PageMode |
getPageMode()
Returns the page display mode.
|
PDPageTree |
getPages()
Returns all pages in the document, as a page tree.
|
PDStructureTreeRoot |
getStructureTreeRoot()
Get the document's structure tree root, or null if none exists.
|
List<PDThread> |
getThreads()
Returns the document's article threads.
|
PDURIDictionary |
getURI()
Returns the document-level URI.
|
String |
getVersion()
Returns the PDF specification version this document conforms to.
|
PDViewerPreferences |
getViewerPreferences()
Get the viewer preferences associated with this document or null if they do not exist.
|
void |
setAcroForm(PDAcroForm acroForm)
Sets the AcroForm for this catalog.
|
void |
setActions(PDDocumentCatalogAdditionalActions actions)
Sets the additional actions for the document.
|
void |
setDocumentOutline(PDDocumentOutline outlines)
Sets the document outlines.
|
void |
setLanguage(String language)
Sets the Language for the document.
|
void |
setMarkInfo(PDMarkInfo markInfo)
Set information about the doc's usage of tagged features.
|
void |
setMetadata(PDMetadata meta)
Sets the metadata for this object.
|
void |
setNames(PDDocumentNameDictionary names)
Sets the names dictionary for the document.
|
void |
setOCProperties(PDOptionalContentProperties ocProperties)
Sets the optional content properties dictionary.
|
void |
setOpenAction(PDDestinationOrAction action)
Sets the Document Open Action for this object.
|
void |
setOutputIntents(List<PDOutputIntent> outputIntents)
Replace the list of OutputIntents of the document.
|
void |
setPageLabels(PDPageLabels labels)
Sets the page label descriptor for the document.
|
void |
setPageLayout(PageLayout layout)
Sets the page layout.
|
void |
setPageMode(PageMode mode)
Sets the page mode.
|
void |
setStructureTreeRoot(PDStructureTreeRoot treeRoot)
Sets the document's structure tree root.
|
void |
setThreads(List<PDThread> threads)
Sets the list of threads for this pdf document.
|
void |
setURI(PDURIDictionary uri)
Sets the document level URI.
|
void |
setVersion(String version)
Sets the PDF specification version this document conforms to.
|
void |
setViewerPreferences(PDViewerPreferences prefs)
Sets the viewer preferences.
|
public PDDocumentCatalog(PDDocument doc)
doc
- The document that this catalog is part of.public PDDocumentCatalog(PDDocument doc, COSDictionary rootDictionary)
doc
- The document that this catalog is part of.rootDictionary
- The root dictionary that this object wraps.public COSDictionary getCOSObject()
getCOSObject
in interface COSObjectable
public PDAcroForm getAcroForm()
public void setAcroForm(PDAcroForm acroForm)
acroForm
- The new AcroForm.public PDPageTree getPages()
public PDViewerPreferences getViewerPreferences()
public void setViewerPreferences(PDViewerPreferences prefs)
prefs
- The new viewer preferences.public PDDocumentOutline getDocumentOutline()
public void setDocumentOutline(PDDocumentOutline outlines)
outlines
- The new document outlines.public void setThreads(List<PDThread> threads)
threads
- The list of threads, or null to clear it.public PDMetadata getMetadata()
public void setMetadata(PDMetadata meta)
meta
- The meta data for this object.public void setOpenAction(PDDestinationOrAction action)
action
- The action you want to perform.public PDDestinationOrAction getOpenAction() throws IOException
IOException
- If there is an error creating the destination or action.public PDDocumentCatalogAdditionalActions getActions()
public void setActions(PDDocumentCatalogAdditionalActions actions)
actions
- The actions that are associated with this document.public PDDocumentNameDictionary getNames()
public PDDocumentNameDestinationDictionary getDests()
public PDPageDestination findNamedDestinationPage(PDNamedDestination namedDest) throws IOException
namedDest
- the named destination.IOException
- if there is an error creating the PDPageDestination object.public void setNames(PDDocumentNameDictionary names)
names
- The names dictionary that is associated with this document.public PDMarkInfo getMarkInfo()
public void setMarkInfo(PDMarkInfo markInfo)
markInfo
- The new MarkInfo data.public List<PDOutputIntent> getOutputIntents()
public void addOutputIntent(PDOutputIntent outputIntent)
outputIntent
- the OutputIntent to add.public void setOutputIntents(List<PDOutputIntent> outputIntents)
outputIntents
- the list of OutputIntents, if the list is empty all OutputIntents are
removed.public PageMode getPageMode()
public void setPageMode(PageMode mode)
mode
- The new page mode.public PageLayout getPageLayout()
public void setPageLayout(PageLayout layout)
layout
- The new page layout.public PDURIDictionary getURI()
public void setURI(PDURIDictionary uri)
uri
- The new document level URI.public PDStructureTreeRoot getStructureTreeRoot()
public void setStructureTreeRoot(PDStructureTreeRoot treeRoot)
treeRoot
- The new structure tree.public String getLanguage()
public void setLanguage(String language)
language
- The new document language.public String getVersion()
public void setVersion(String version)
version
- the PDF version (e.g. "1.4")public PDPageLabels getPageLabels() throws IOException
IOException
- If there is a problem retrieving the page labels.public void setPageLabels(PDPageLabels labels)
labels
- the new page label descriptor to set.public PDOptionalContentProperties getOCProperties()
public void setOCProperties(PDOptionalContentProperties ocProperties)
ocProperties
- the optional properties dictionaryCopyright © 2002–2017 The Apache Software Foundation. All rights reserved.