iText 7 7.1.9 API
iText.Kernel.Pdf.Action.PdfTarget Class Reference

A target dictionary locates the target in relation to the source, in much the same way that a relative path describes the physical relationship between two files in a file system. More...

Inheritance diagram for iText.Kernel.Pdf.Action.PdfTarget:
iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >

Public Member Functions

virtual iText.Kernel.Pdf.Action.PdfTarget  SetName (String name)
  Sets the name of the file in the EmbeddedFiles name tree for the child target located in the EmbeddedFiles. More...
 
virtual String  GetName ()
  Gets name of the file in the EmbeddedFiles name tree for the child target located in the EmbeddedFiles. More...
 
virtual iText.Kernel.Pdf.Action.PdfTarget  SetAnnotation (PdfFileAttachmentAnnotation pdfAnnotation, PdfDocument pdfDocument)
  Sets the /P and /A values corresponding to provided annotation, which is already added to a page. More...
 
virtual PdfFileAttachmentAnnotation  GetAnnotation (PdfDocument pdfDocument)
  Gets the annotation specified by /A and /P entry values. More...
 
virtual iText.Kernel.Pdf.Action.PdfTarget  SetTarget (iText.Kernel.Pdf.Action.PdfTarget target)
  Sets a target dictionary specifying additional path information to the target document. More...
 
virtual iText.Kernel.Pdf.Action.PdfTarget  GetTarget ()
  Get a target dictionary specifying additional path information to the target document. More...
 
virtual iText.Kernel.Pdf.Action.PdfTarget  Put (PdfName key, PdfObject value)
  This is a convenient method to put key-value pairs to the underlying iText.Kernel.Pdf.PdfObject. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual void  Flush ()
 
virtual bool  IsFlushed ()
 

Static Public Member Functions

static iText.Kernel.Pdf.Action.PdfTarget  Create (PdfDictionary pdfObject)
  Creates a new PdfTarget object by the underlying dictionary. More...
 
static iText.Kernel.Pdf.Action.PdfTarget  CreateParentTarget ()
  Creates a new target object pointing to the parent of the current document. More...
 
static iText.Kernel.Pdf.Action.PdfTarget  CreateChildTarget ()
  Creates a new target object pointing to the child of the current document. More...
 
static iText.Kernel.Pdf.Action.PdfTarget  CreateChildTarget (String embeddedFileName)
  Creates a new target object pointing to a file in the EmbeddedFiles name tree. More...
 
static iText.Kernel.Pdf.Action.PdfTarget  CreateChildTarget (String namedDestination, String annotationIdentifier)
  Creates a new target object pointing to a file attachment annotation. More...
 
static iText.Kernel.Pdf.Action.PdfTarget  CreateChildTarget (int pageNumber, int annotationIndex)
  Creates a new target object pointing to a file attachment annotation. More...
 

Detailed Description

A target dictionary locates the target in relation to the source, in much the same way that a relative path describes the physical relationship between two files in a file system.

A target dictionary locates the target in relation to the source, in much the same way that a relative path describes the physical relationship between two files in a file system. Target dictionaries may be nested recursively to specify one or more intermediate targets before reaching the final one.

Member Function Documentation

◆ Create()

static iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.Create ( PdfDictionary  pdfObject )
inlinestatic

Creates a new PdfTarget object by the underlying dictionary.

Parameters
pdfObject the underlying dictionary object

◆ CreateChildTarget() [1/4]

static iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.CreateChildTarget ( )
inlinestatic

Creates a new target object pointing to the child of the current document.

Returns
created PdfTarget

◆ CreateChildTarget() [2/4]

static iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.CreateChildTarget ( int  pageNumber,
int  annotationIndex 
)
inlinestatic

Creates a new target object pointing to a file attachment annotation.

Parameters
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
Returns
created object

◆ CreateChildTarget() [3/4]

static iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.CreateChildTarget ( String  embeddedFileName )
inlinestatic

Creates a new target object pointing to a file in the EmbeddedFiles name tree.

Parameters
embeddedFileName the name of the file in the EmbeddedFiles name tree
Returns
created object

◆ CreateChildTarget() [4/4]

static iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.CreateChildTarget ( String  namedDestination,
String  annotationIdentifier 
)
inlinestatic

Creates a new target object pointing to a file attachment annotation.

Parameters
namedDestination a named destination in the current document that provides the page number of the file attachment annotation
annotationIdentifier a unique annotation identifier ( iText.Kernel.Pdf.PdfName.NM entry) of the annotation
Returns
created object

◆ CreateParentTarget()

static iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.CreateParentTarget ( )
inlinestatic

Creates a new target object pointing to the parent of the current document.

Returns
created PdfTarget

◆ GetAnnotation()

virtual PdfFileAttachmentAnnotation iText.Kernel.Pdf.Action.PdfTarget.GetAnnotation ( PdfDocument  pdfDocument )
inlinevirtual

Gets the annotation specified by /A and /P entry values.

Parameters
pdfDocument specifies the corresponding document
Returns
the annotation specified by /A and /P entry value.

◆ GetName()

virtual String iText.Kernel.Pdf.Action.PdfTarget.GetName ( )
inlinevirtual

Gets name of the file in the EmbeddedFiles name tree for the child target located in the EmbeddedFiles.

Returns
the name of the child file for this target

◆ GetTarget()

virtual iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.GetTarget ( )
inlinevirtual

Get a target dictionary specifying additional path information to the target document.

Get a target dictionary specifying additional path information to the target document. If the current target object is the final node in the target path, null is returned.

Returns
a target dictionary specifying additional path information to the target document

◆ Put()

virtual iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.Put ( PdfName  key,
PdfObject  value 
)
inlinevirtual

This is a convenient method to put key-value pairs to the underlying iText.Kernel.Pdf.PdfObject.

Parameters
key the key, a iText.Kernel.Pdf.PdfName instance
value the value
Returns
this object wrapper

◆ SetAnnotation()

virtual iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.SetAnnotation ( PdfFileAttachmentAnnotation  pdfAnnotation,
PdfDocument  pdfDocument 
)
inlinevirtual

Sets the /P and /A values corresponding to provided annotation, which is already added to a page.

Parameters
pdfAnnotation the annotation to be set
pdfDocument the corresponding document
Returns
this object wrapper

◆ SetName()

virtual iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.SetName ( String  name )
inlinevirtual

Sets the name of the file in the EmbeddedFiles name tree for the child target located in the EmbeddedFiles.

Parameters
name the name of the file
Returns
this object wrapper

◆ SetTarget()

virtual iText.Kernel.Pdf.Action.PdfTarget iText.Kernel.Pdf.Action.PdfTarget.SetTarget ( iText.Kernel.Pdf.Action.PdfTarget  target )
inlinevirtual

Sets a target dictionary specifying additional path information to the target document.

Sets 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.

Parameters
target the additional path target dictionary
Returns
this object wrapper