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, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleasepublic PdfTargetDictionary(PdfDictionary pdfObject)
PdfTargetDictionary object by the underlying dictionary.pdfObject - the underlying dictionary objectpublic 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 targetpublic PdfTargetDictionary(PdfName r, PdfString n, PdfObject p, PdfObject a, PdfTargetDictionary t)
PdfTargetDictionary object.r - the relationship between the current document and the targetn - the name of the file in the EmbeddedFiles name treep - 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 annotationa - 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 dictionaryt - 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 destinationpublic static PdfTargetDictionary createParentTarget()
PdfTargetDictionarypublic static PdfTargetDictionary createChildTarget(String embeddedFileName)
embeddedFileName - the name of the file in the EmbeddedFiles name treepublic static PdfTargetDictionary createChildTarget(String namedDestination, String annotationIdentifier)
namedDestination - a named destination in the current document that
provides the page number of the file attachment annotationannotationIdentifier - a unique annotation identifier (PdfName.NM entry) of the annotationpublic static PdfTargetDictionary createChildTarget(int pageNumber, int annotationIndex)
pageNumber - the number of the page in the current document, one-basedannotationIndex - the index of the annotation in the Annots entry of the page, zero-basedpublic PdfTargetDictionary setName(String name)
name - the name of the filepublic PdfString getName()
public PdfTargetDictionary setPage(int pageNumber)
pageNumber - the page number (one-based) in the current document containing
the file attachment annotationpublic PdfTargetDictionary setPage(String namedDestination)
namedDestination - a named destination in the current document that provides the page
number of the file attachment annotationpublic PdfObject getPage()
public PdfTargetDictionary setAnnotation(int annotationIndex)
annotationIndex - the index (zero-based) of the annotation in the Annots arraypublic PdfTargetDictionary setAnnotation(String annotationName)
annotationName - specifies the value of NM in the annotation dictionary of the target annotationpublic PdfObject getAnnotation()
public PdfTargetDictionary setTarget(PdfTargetDictionary target)
target - the additional path target dictionarypublic PdfTargetDictionary getTarget()
null is returned.public PdfTargetDictionary put(PdfName key, PdfObject value)
PdfObject.key - the key, a PdfName instancevalue - the valueprotected boolean isWrappedObjectMustBeIndirect()
isWrappedObjectMustBeIndirect in class PdfObjectWrapper<PdfDictionary>Copyright © 1998–2017 iText Group NV. All rights reserved.