public class PdfTargetDictionary extends PdfObjectWrapper<PdfDictionary>
Constructor and Description |
---|
PdfTargetDictionary(PdfDictionary pdfObject)
Creates a new PdfTargetDictionary object by the underlying dictionary.
|
PdfTargetDictionary(PdfName r)
Creates a new PdfTargetDictionary object given its type.
|
PdfTargetDictionary(PdfName r, PdfString n, PdfObject p, PdfObject a, PdfTargetDictionary t)
Creates a new PdfTargetDictionary object.
|
Modifier and Type | Method and Description |
---|---|
static PdfTargetDictionary |
createChildTarget(int pageNumber, int annotationIndex)
Creates a new target object pointing to a file attachment annotation.
|
static PdfTargetDictionary |
createChildTarget(String embeddedFileName)
Creates a new target object pointing to a file in the EmbeddedFiles name tree.
|
static PdfTargetDictionary |
createChildTarget(String namedDestination, String annotationIdentifier)
Creates a new target object pointing to a file attachment annotation.
|
static PdfTargetDictionary |
createParentTarget()
Creates a new target object pointing to the parent of the current document.
|
PdfObject |
getAnnotation()
Gets the object in the /A entry of the underlying object.
|
PdfString |
getName()
Gets name of the file in the EmbeddedFiles name tree for the child target located in the EmbeddedFiles.
|
PdfObject |
getPage()
Get the contents of the /P entry of this target object.
|
PdfTargetDictionary |
getTarget()
Get a target dictionary specifying additional path information to the target document.
|
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.
|
PdfTargetDictionary |
put(PdfName key, PdfObject value)
This is a convenient method to put key-value pairs to the underlying PdfObject .
|
PdfTargetDictionary |
setAnnotation(int annotationIndex)
Sets the index of the annotation in Annots array of the page specified by /P entry for the child target associated with a file attachment annotation.
|
PdfTargetDictionary |
setAnnotation(String annotationName)
Sets the text value, which uniquely identifies an annotation (/NM entry) in an annotation dictionary for the child target associated with a file attachment annotation.
|
PdfTargetDictionary |
setName(String name)
Sets the name of the file in the EmbeddedFiles name tree for the child target located in the EmbeddedFiles.
|
PdfTargetDictionary |
setPage(int pageNumber)
Sets the page number in the current document containing the file attachment annotation for the child target associates with a file attachment annotation.
|
PdfTargetDictionary |
setPage(String namedDestination)
Sets a named destination in the current document that provides the page number of the file attachment annotation for the child target associated with a file attachment annotation.
|
PdfTargetDictionary |
setTarget(PdfTargetDictionary target)
Sets a target dictionary specifying additional path information to the target document.
|
ensureObjectIsAddedToDocument, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public PdfTargetDictionary(PdfDictionary pdfObject)
PdfTargetDictionary
object by the underlying dictionary.
pdfObject
- the underlying dictionary object
public PdfTargetDictionary(PdfName r)
PdfTargetDictionary
object given its type. The type must be either PdfName.P
, or PdfName.C
. If it is PdfName.C
, additional entries must be specified according to the spec.
r
- the relationship between the current document and the target
public PdfTargetDictionary(PdfName r, PdfString n, PdfObject p, PdfObject a, PdfTargetDictionary t)
PdfTargetDictionary
object.
r
- the relationship between the current document and the target
n
- the name of the file in the EmbeddedFiles name tree
p
- if the value is an integer, it specifies the page number (zero-based) in the current document containing the file attachment annotation. If the value is a string, it specifies a named destination in the current document that provides the page number of the file attachment annotation
a
- If the value is an integer, it specifies the index (zero-based) of the annotation in the Annots array of the page specified by P. If the value is a text string, it specifies the value of NM in the annotation dictionary
t
- A target dictionary specifying additional path information to the target document. If this entry is absent, the current document is the target file containing the destination
public static PdfTargetDictionary createParentTarget()
PdfTargetDictionary
public static PdfTargetDictionary createChildTarget(String embeddedFileName)
embeddedFileName
- the name of the file in the EmbeddedFiles name tree
public static PdfTargetDictionary createChildTarget(String namedDestination, String annotationIdentifier)
namedDestination
- a named destination in the current document that provides the page number of the file attachment annotation
annotationIdentifier
- a unique annotation identifier (PdfName.NM
entry) of the annotation
public static PdfTargetDictionary createChildTarget(int pageNumber, int annotationIndex)
pageNumber
- the number of the page in the current document, one-based
annotationIndex
- the index of the annotation in the Annots entry of the page, zero-based
public PdfTargetDictionary setName(String name)
name
- the name of the file
public PdfString getName()
public PdfTargetDictionary setPage(int pageNumber)
pageNumber
- the page number (one-based) in the current document containing the file attachment annotation
public PdfTargetDictionary setPage(String namedDestination)
namedDestination
- a named destination in the current document that provides the page number of the file attachment annotation
public PdfObject getPage()
public PdfTargetDictionary setAnnotation(int annotationIndex)
annotationIndex
- the index (zero-based) of the annotation in the Annots array
public PdfTargetDictionary setAnnotation(String annotationName)
annotationName
- specifies the value of NM in the annotation dictionary of the target annotation
public PdfObject getAnnotation()
public PdfTargetDictionary setTarget(PdfTargetDictionary target)
target
- the additional path target dictionary
public PdfTargetDictionary getTarget()
null
is returned.
public PdfTargetDictionary put(PdfName key, PdfObject value)
PdfObject
.
key
- the key, a PdfName
instance
value
- the value
protected boolean isWrappedObjectMustBeIndirect()
isWrappedObjectMustBeIndirect
in class PdfObjectWrapper<PdfDictionary>
Copyright © 1998–2016 iText Group NV. All rights reserved.