Package org.apache.pdfbox.pdmodel
Class PDDocumentNameDictionary
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.PDDocumentNameDictionary
-
- All Implemented Interfaces:
COSObjectable
public class PDDocumentNameDictionary extends java.lang.Object implements COSObjectable
This class holds all of the name trees that are available at the document level.
-
-
Field Summary
Fields Modifier and Type Field Description private PDDocumentCatalog
catalog
private COSDictionary
nameDictionary
-
Constructor Summary
Constructors Constructor Description PDDocumentNameDictionary(PDDocumentCatalog cat)
Constructor.PDDocumentNameDictionary(PDDocumentCatalog cat, COSDictionary names)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description COSDictionary
getCOSObject()
Convert this standard java object to a COS object.PDDestinationNameTreeNode
getDests()
Get the destination name tree node.PDEmbeddedFilesNameTreeNode
getEmbeddedFiles()
Get the embedded files named tree node.PDJavascriptNameTreeNode
getJavaScript()
Get the document level JavaScript name tree.void
setDests(PDDestinationNameTreeNode dests)
Set the named destinations that are associated with this document.void
setEmbeddedFiles(PDEmbeddedFilesNameTreeNode ef)
Set the named embedded files that are associated with this document.void
setJavascript(PDJavascriptNameTreeNode js)
Set the named javascript entries that are associated with this document.
-
-
-
Field Detail
-
nameDictionary
private final COSDictionary nameDictionary
-
catalog
private final PDDocumentCatalog catalog
-
-
Constructor Detail
-
PDDocumentNameDictionary
public PDDocumentNameDictionary(PDDocumentCatalog cat)
Constructor.- Parameters:
cat
- The document catalog that this dictionary is part of.
-
PDDocumentNameDictionary
public PDDocumentNameDictionary(PDDocumentCatalog cat, COSDictionary names)
Constructor.- Parameters:
cat
- The document that this dictionary is part of.names
- The names dictionary.
-
-
Method Detail
-
getCOSObject
public COSDictionary getCOSObject()
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- The cos dictionary for this object.
-
getDests
public PDDestinationNameTreeNode getDests()
Get the destination name tree node. The values in this name tree will be PDPageDestination objects.- Returns:
- The destination name tree node.
-
setDests
public void setDests(PDDestinationNameTreeNode dests)
Set the named destinations that are associated with this document.- Parameters:
dests
- The destination names.
-
getEmbeddedFiles
public PDEmbeddedFilesNameTreeNode getEmbeddedFiles()
Get the embedded files named tree node. The values in this name tree will be PDComplexFileSpecification objects.- Returns:
- The embedded files name tree node.
-
setEmbeddedFiles
public void setEmbeddedFiles(PDEmbeddedFilesNameTreeNode ef)
Set the named embedded files that are associated with this document.- Parameters:
ef
- The new embedded files
-
getJavaScript
public PDJavascriptNameTreeNode getJavaScript()
Get the document level JavaScript name tree. When the document is opened, all the JavaScript actions in it shall be executed, defining JavaScript functions for use by other scripts in the document.- Returns:
- The document level JavaScript name tree.
-
setJavascript
public void setJavascript(PDJavascriptNameTreeNode js)
Set the named javascript entries that are associated with this document.- Parameters:
js
- The new Javascript entries.
-
-