public class PDTargetDirectory extends Object implements COSObjectable
Constructor and Description |
---|
PDTargetDirectory()
Default constructor, creates target directory.
|
PDTargetDirectory(COSDictionary dictionary)
Create a target directory from an existing dictionary.
|
Modifier and Type | Method and Description |
---|---|
int |
getAnnotationIndex()
If the value in the /A entry is an integer, this will get the index (zero-based) of the
annotation in the /Annots array of the page specified by the /P entry.
|
String |
getAnnotationName()
If the value in the /A entry is a string, this will get the value of the /NM entry in the
annotation dictionary.
|
COSDictionary |
getCOSObject()
This will get the underlying dictionary that this class acts on.
|
String |
getFilename()
Get the name of the file as found in the EmbeddedFiles name tree.
|
PDNamedDestination |
getNamedDestination()
If the value in the /P entry is a string, this will get a named destination in the current
document that provides the page number of the file attachment annotation.
|
int |
getPageNumber()
If the value in the /P entry is an integer, this will get the page number (zero-based) in the
current document containing the file attachment annotation.
|
COSName |
getRelationship()
Get the relationship between the current document and the target (which may be an
intermediate target).
|
PDTargetDirectory |
getTargetDirectory()
Get the target directory.
|
void |
setAnnotationIndex(int index)
This will set the index (zero-based) of the annotation in the /Annots array of the page
specified by the /P entry.
|
void |
setAnnotationName(String name)
This will get the value of the /NM entry in the annotation dictionary.
|
void |
setFilename(String filename)
Sets the name of the file as found in the EmbeddedFiles name tree.
|
void |
setNamedDestination(PDNamedDestination dest)
This will set a named destination in the current document that provides the page number of
the file attachment annotation.
|
void |
setPageNumber(int pageNumber)
Set the page number (zero-based) in the current document containing the file attachment
annotation.
|
void |
setRelationship(COSName relationship)
Set the relationship between the current document and the target (which may be an
intermediate target).
|
void |
setTargetDirectory(PDTargetDirectory targetDirectory)
Sets the target directory.
|
public PDTargetDirectory()
public PDTargetDirectory(COSDictionary dictionary)
dictionary
- The existing graphics state.public COSDictionary getCOSObject()
getCOSObject
in interface COSObjectable
public COSName getRelationship()
public void setRelationship(COSName relationship)
relationship
- Valid values are P (the target is the parent of the current document) and
C (the target is a child of the current document).
throws IllegalArgumentException if the parameter is not P or C.public String getFilename()
public void setFilename(String filename)
filename
- a filename or null if the entry is to be deleted.public PDTargetDirectory getTargetDirectory()
public void setTargetDirectory(PDTargetDirectory targetDirectory)
targetDirectory
- the target directory or null if the current document is the target
file containing the destination.public int getPageNumber()
public void setPageNumber(int pageNumber)
pageNumber
- the zero based page number. If this is < 0 then the entry is removed.public PDNamedDestination getNamedDestination()
public void setNamedDestination(PDNamedDestination dest)
dest
- a named destination or null if the entry is to be removed.public int getAnnotationIndex()
public void setAnnotationIndex(int index)
index
- the zero based index. If this is < 0 then the entry is removed.public String getAnnotationName()
public void setAnnotationName(String name)
name
- the /NM value of an annotation dictionary or null if the entry is to be removed.Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.