This class holds all of the name trees that are available at the document level.
Method from org.apache.pdfbox.pdmodel.PDDocumentNameDictionary Detail: |
public COSDictionary getCOSDictionary() {
return nameDictionary;
}
Convert this standard java object to a COS object. |
public COSBase getCOSObject() {
return nameDictionary;
}
Convert this standard java object to a COS object. |
public PDDestinationNameTreeNode getDests() {
PDDestinationNameTreeNode dests = null;
COSDictionary dic = (COSDictionary)nameDictionary.getDictionaryObject( COSName.DESTS );
//The document catalog also contains the Dests entry sometimes
//so check there as well.
if( dic == null )
{
dic = (COSDictionary)catalog.getCOSDictionary().getDictionaryObject( COSName.DESTS );
}
if( dic != null )
{
dests = new PDDestinationNameTreeNode( dic );
}
return dests;
}
Get the destination named tree node. The value in this name tree will be PDDestination
objects. |
public PDEmbeddedFilesNameTreeNode getEmbeddedFiles() {
PDEmbeddedFilesNameTreeNode retval = null;
COSDictionary dic = (COSDictionary)nameDictionary.getDictionaryObject( COSName.EMBEDDED_FILES );
if( dic != null )
{
retval = new PDEmbeddedFilesNameTreeNode( dic );
}
return retval;
}
Get the embedded files named tree node. The value in this name tree will be PDComplexFileSpecification
objects. |
public PDJavascriptNameTreeNode getJavaScript() {
PDJavascriptNameTreeNode retval = null;
COSDictionary dic = (COSDictionary)nameDictionary.getDictionaryObject( COSName.JAVA_SCRIPT );
if( dic != null )
{
retval = new PDJavascriptNameTreeNode( dic );
}
return retval;
}
Get the document level javascript entries. The value in this name tree will be PDTextStream. |
public void setDests(PDDestinationNameTreeNode dests) {
nameDictionary.setItem( COSName.DESTS, dests );
//The dests can either be in the document catalog or in the
//names dictionary, PDFBox will just maintain the one in the
//names dictionary for now unless there is a reason to do
//something else.
//clear the potentially out of date Dests reference.
catalog.getCOSDictionary().setItem( COSName.DESTS, (COSObjectable)null);
}
Set the named destinations that are associated with this document. |
public void setEmbeddedFiles(PDEmbeddedFilesNameTreeNode ef) {
nameDictionary.setItem( COSName.EMBEDDED_FILES, ef );
}
Set the named embedded files that are associated with this document. |
public void setJavascript(PDJavascriptNameTreeNode js) {
nameDictionary.setItem( COSName.JAVA_SCRIPT, js );
}
Set the named javascript entries that are associated with this document. |