public class PdfTarget extends PdfObjectWrapper<PdfDictionary>
| Modifier and Type | Method and Description |
|---|---|
static PdfTarget |
create(PdfDictionary pdfObject)
Creates a new PdfTarget object by the underlying dictionary.
|
static PdfTarget |
createChildTarget()
Creates a new target object pointing to the child of the current document.
|
static PdfTarget |
createChildTarget(int pageNumber, int annotationIndex)
Creates a new target object pointing to a file attachment annotation.
|
static PdfTarget |
createChildTarget(String embeddedFileName)
Creates a new target object pointing to a file in the EmbeddedFiles name tree.
|
static PdfTarget |
createChildTarget(String namedDestination, String annotationIdentifier)
Creates a new target object pointing to a file attachment annotation.
|
static PdfTarget |
createParentTarget()
Creates a new target object pointing to the parent of the current document.
|
PdfFileAttachmentAnnotation |
getAnnotation(PdfDocument pdfDocument)
Gets the annotation specified by /A and /P entry values.
|
String |
getName()
Gets name of the file in the EmbeddedFiles name tree for the child target located in the EmbeddedFiles.
|
PdfTarget |
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.
|
PdfTarget |
put(PdfName key, PdfObject value)
This is a convenient method to put key-value pairs to the underlying PdfObject.
|
PdfTarget |
setAnnotation(PdfFileAttachmentAnnotation pdfAnnotation, PdfDocument pdfDocument)
Sets the /P and /A values corresponding to provided annotation, which is already added to a page.
|
PdfTarget |
setName(String name)
Sets the name of the file in the EmbeddedFiles name tree for the child target located in the EmbeddedFiles.
|
PdfTarget |
setTarget(PdfTarget 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 static PdfTarget create(PdfDictionary pdfObject)
PdfTarget object by the underlying dictionary.
pdfObject - the underlying dictionary object
public static PdfTarget createParentTarget()
PdfTarget
public static PdfTarget createChildTarget()
PdfTarget
public static PdfTarget createChildTarget(String embeddedFileName)
embeddedFileName - the name of the file in the EmbeddedFiles name tree
public static PdfTarget 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 PdfTarget 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 PdfTarget setName(String name)
name - the name of the file
public String getName()
public PdfTarget setAnnotation(PdfFileAttachmentAnnotation pdfAnnotation, PdfDocument pdfDocument)
pdfAnnotation - the annotation to be set
pdfDocument - the corresponding document
public PdfFileAttachmentAnnotation getAnnotation(PdfDocument pdfDocument)
pdfDocument - specifies the corresponding document
public PdfTarget setTarget(PdfTarget target)
target - the additional path target dictionary
public PdfTarget getTarget()
null is returned.
public PdfTarget 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–2019 iText Group NV. All rights reserved.