Table of Contents

Class PdfWidgetAnnotation

Namespace
iText.Kernel.Pdf.Annot
Assembly
itext.kernel.dll
public class PdfWidgetAnnotation : PdfAnnotation
Inheritance
PdfWidgetAnnotation
Inherited Members

Constructors

PdfWidgetAnnotation(Rectangle)

public PdfWidgetAnnotation(Rectangle rect)

Parameters

rect Rectangle

PdfWidgetAnnotation(PdfDictionary)

Instantiates a new PdfWidgetAnnotation instance based on PdfDictionary instance, that represents existing annotation object in the document.

protected PdfWidgetAnnotation(PdfDictionary pdfObject)

Parameters

pdfObject PdfDictionary

the PdfDictionary representing annotation object

See Also

Fields

HIDDEN

public const int HIDDEN = 1

Field Value

int

HIDDEN_BUT_PRINTABLE

public const int HIDDEN_BUT_PRINTABLE = 3

Field Value

int

VISIBLE

public const int VISIBLE = 4

Field Value

int

VISIBLE_BUT_DOES_NOT_PRINT

public const int VISIBLE_BUT_DOES_NOT_PRINT = 2

Field Value

int

Methods

GetAction()

An PdfAction to perform, such as launching an application, playing a sound, changing an annotation’s appearance state etc, when the annotation is activated.

public virtual PdfDictionary GetAction()

Returns

PdfDictionary

PdfDictionary which defines the characteristics and behaviour of an action.

GetAdditionalAction()

An additional actions dictionary that extends the set of events that can trigger the execution of an action.

public virtual PdfDictionary GetAdditionalAction()

Returns

PdfDictionary

an additional actions PdfDictionary.

Remarks

An additional actions dictionary that extends the set of events that can trigger the execution of an action. See ISO-320001 12.6.3 Trigger Events.

See Also

GetAppearanceCharacteristics()

An appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream.

public virtual PdfDictionary GetAppearanceCharacteristics()

Returns

PdfDictionary

an appearance characteristics dictionary or null if it isn't specified.

Remarks

An appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream. See ISO-320001, Table 189.

GetBorderStyle()

The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry.

public virtual PdfDictionary GetBorderStyle()

Returns

PdfDictionary

PdfDictionary which is a border style dictionary or null if it is not specified.

Remarks

The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry. That entry specifies a border style dictionary that has more settings than the array specified for the Border entry (see GetBorder() ). If an annotation dictionary includes the BS entry, then the Border entry is ignored. If annotation includes AP (see GetAppearanceDictionary() ) it takes precedence over the BS entry. For more info on BS entry see ISO-320001, Table 166.

GetHighlightMode()

Getter for the annotation's highlighting mode.

public virtual PdfName GetHighlightMode()

Returns

PdfName

Current value of the annotation's highlighting mode.

GetSubtype()

public override PdfName GetSubtype()

Returns

PdfName

ReleaseFormFieldFromWidgetAnnotation()

Remove widget annotation from AcroForm hierarchy.

public virtual void ReleaseFormFieldFromWidgetAnnotation()

SetAction(PdfAction)

Sets a PdfAction to this annotation which will be performed when the annotation is activated.

public virtual PdfWidgetAnnotation SetAction(PdfAction action)

Parameters

action PdfAction

PdfAction to set to this annotation.

Returns

PdfWidgetAnnotation

this PdfWidgetAnnotation instance.

SetAdditionalAction(PdfName, PdfAction)

Sets an additional PdfAction to this annotation which will be performed in response to the specific trigger event defined by key.

public virtual PdfWidgetAnnotation SetAdditionalAction(PdfName key, PdfAction action)

Parameters

key PdfName

a PdfName that denotes a type of the additional action to set.

action PdfAction

PdfAction to set as additional to this annotation.

Returns

PdfWidgetAnnotation

this PdfWidgetAnnotation instance.

Remarks

Sets an additional PdfAction to this annotation which will be performed in response to the specific trigger event defined by key . See ISO-320001 12.6.3, "Trigger Events".

SetAppearanceCharacteristics(PdfDictionary)

Sets an appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream.

public virtual PdfWidgetAnnotation SetAppearanceCharacteristics(PdfDictionary characteristics)

Parameters

characteristics PdfDictionary

the PdfDictionary with additional information for appearance stream.

Returns

PdfWidgetAnnotation

this PdfWidgetAnnotation instance.

Remarks

Sets an appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream. See ISO-320001, Table 189.

SetBorderStyle(PdfDictionary)

Sets border style dictionary that has more settings than the array specified for the Border entry ( GetBorder() ).

public virtual PdfWidgetAnnotation SetBorderStyle(PdfDictionary borderStyle)

Parameters

borderStyle PdfDictionary

a border style dictionary specifying the line width and dash pattern that shall be used in drawing the annotation’s border.

Returns

PdfWidgetAnnotation

this PdfWidgetAnnotation instance.

Remarks

Sets border style dictionary that has more settings than the array specified for the Border entry ( GetBorder() ). See ISO-320001, Table 166 and GetBorderStyle() for more info.

SetBorderStyle(PdfName)

Setter for the annotation's preset border style.

public virtual PdfWidgetAnnotation SetBorderStyle(PdfName style)

Parameters

style PdfName

The new value for the annotation's border style.

Returns

PdfWidgetAnnotation

this PdfWidgetAnnotation instance.

Remarks

Setter for the annotation's preset border style. Possible values are

  • STYLE_SOLID - A solid rectangle surrounding the annotation.
  • STYLE_DASHED - A dashed rectangle surrounding the annotation.
  • STYLE_BEVELED - A simulated embossed rectangle that appears to be raised above the surface of the page.
  • STYLE_INSET - A simulated engraved rectangle that appears to be recessed below the surface of the page.
  • STYLE_UNDERLINE - A single line along the bottom of the annotation rectangle.
See also ISO-320001, Table 166.
See Also

SetDashPattern(PdfArray)

Setter for the annotation's preset dashed border style.

public virtual PdfWidgetAnnotation SetDashPattern(PdfArray dashPattern)

Parameters

dashPattern PdfArray

a dash array defining a pattern of dashes and gaps that shall be used in drawing a dashed border.

Returns

PdfWidgetAnnotation

this PdfWidgetAnnotation instance.

Remarks

Setter for the annotation's preset dashed border style. This property has affect only if STYLE_DASHED style was used for the annotation border style (see SetBorderStyle(PdfName). See ISO-320001 8.4.3.6, "Line Dash Pattern" for the format in which dash pattern shall be specified.

SetHighlightMode(PdfName)

Setter for the annotation's highlighting mode.

public virtual PdfWidgetAnnotation SetHighlightMode(PdfName mode)

Parameters

mode PdfName

The new value for the annotation's highlighting mode.

Returns

PdfWidgetAnnotation

The widget annotation which this method was called on.

Remarks

Setter for the annotation's highlighting mode. Possible values are

SetParent(PdfObject)

public virtual PdfWidgetAnnotation SetParent(PdfObject parent)

Parameters

parent PdfObject

Returns

PdfWidgetAnnotation

SetVisibility(int)

Set the visibility flags of the Widget annotation Options are: HIDDEN, HIDDEN_BUT_PRINTABLE, VISIBLE, VISIBLE_BUT_DOES_NOT_PRINT

public virtual PdfWidgetAnnotation SetVisibility(int visibility)

Parameters

visibility int

visibility option

Returns

PdfWidgetAnnotation

the edited widget annotation