Table of Contents

Class PdfWidget

Namespace
MiPdf.Forms
Assembly
MiPdf.dll

A widget annotation (the visible part of a field on a page).

public sealed class PdfWidget
Inheritance
PdfWidget
Inherited Members

Properties

AppearanceState

The selected appearance state (/AS) for check boxes and radio buttons.

public string? AppearanceState { get; }

Property Value

string

BackgroundColor

Background color (/MK /BG); null = transparent. Setting it regenerates the appearance (see Rotation).

public PdfColor? BackgroundColor { get; set; }

Property Value

PdfColor?

BorderColor

Border color (/MK /BC); null = no border. Setting it regenerates the appearance (see Rotation).

public PdfColor? BorderColor { get; set; }

Property Value

PdfColor?

BorderWidth

Border width in points (/BS /W, default 1); 0 = no border. Setting it regenerates the appearance (see Rotation).

public double BorderWidth { get; set; }

Property Value

double

Dictionary

The widget annotation dictionary (may be merged with the field dictionary).

public PdfDictionary Dictionary { get; }

Property Value

PdfDictionary

IsHidden

The annotation flag Hidden (/F bit 2): the widget is neither shown nor printed.

public bool IsHidden { get; set; }

Property Value

bool

OnStates

Names of the "on" states defined in the normal appearance (/AP /N), excluding "Off".

public IReadOnlyList<string> OnStates { get; }

Property Value

IReadOnlyList<string>

Page

The page the widget is placed on (null if it is not referenced by any page).

public PdfPage? Page { get; }

Property Value

PdfPage

Rect

The widget rectangle (/Rect) in page coordinates; an empty rectangle if missing.

public PdfRectangle Rect { get; set; }

Property Value

PdfRectangle

Rotation

Counterclockwise rotation of the widget content in degrees (/MK /R): 0, 90, 180 or 270. Setting it regenerates the appearance of text, choice, check box and radio button fields.

public int Rotation { get; set; }

Property Value

int

Methods

ExtractImages()

Images in the widget's appearance (e.g. a signature image), with page coordinates.

public IReadOnlyList<PdfExtractedImage> ExtractImages()

Returns

IReadOnlyList<PdfExtractedImage>