PdfWidgetAnnotation Class

A widget annotation (ISO 32000-2, 12.5.6.19): the appearance of a form field on a page. Its field is in PdfDocument.Form; PdfFormField.Widgets lists the widgets of a field.

public sealed class PdfWidgetAnnotation : PdfAnnotation
Inheritance
PdfAnnotation PdfWidgetAnnotation

Properties

NameDescription
ActionGets or sets the action run when the widget is activated (/A, ISO 32000-2, 12.6), such as the action of a push button; null when it has none.
AppearanceCharacteristicsGets the appearance characteristics of the widget (/MK): its rotation, its colors and the captions of a button.
AppearanceStateGets or sets the appearance state of the widget (/AS, 12.5.5): the name of its appearance in the dictionaries of /AP, such as Off or the export value of a check box.
HighlightModeGets or sets how the widget looks while the mouse button is pressed on it (/H). The default is PdfWidgetHighlightMode.Invert.

Gets or sets the action run when the widget is activated (/A, ISO 32000-2, 12.6), such as the action of a push button; null when it has none.

public PdfAction? Action { get; set; }

Property value

PdfAction?

Exceptions

ArgumentException
The action refers to objects of another document.

AppearanceCharacteristics

PdfWidgetAnnotation.cs

Gets the appearance characteristics of the widget (/MK): its rotation, its colors and the captions of a button.

public PdfAppearanceCharacteristics AppearanceCharacteristics { get; }

AppearanceState

PdfWidgetAnnotation.cs

Gets or sets the appearance state of the widget (/AS, 12.5.5): the name of its appearance in the dictionaries of /AP, such as Off or the export value of a check box.

public string? AppearanceState { get; set; }

Property value

string?

Gets or sets how the widget looks while the mouse button is pressed on it (/H). The default is PdfWidgetHighlightMode.Invert.

public PdfWidgetHighlightMode HighlightMode { get; set; }