Table of Contents

Class PdfFormField

Namespace
MiPdf.Forms
Assembly
MiPdf.dll

Base class of form fields. Use the derived types for type-specific operations.

public abstract class PdfFormField
Inheritance
PdfFormField
Derived
Inherited Members

Properties

AppearanceFont

Font used to generate the appearance (overrides the field's /DA font).

public PdfFont? AppearanceFont { get; set; }

Property Value

PdfFont

Dictionary

The terminal field dictionary.

public PdfDictionary Dictionary { get; }

Property Value

PdfDictionary

FieldType

"Tx", "Btn", "Ch" or "Sig".

public string FieldType { get; }

Property Value

string

Flags

The field flags (/Ff, inherited from the parent fields if this field has none). Setting writes the complete flags to this field, so it no longer inherits them; the parent and the other fields of the parent are not changed. The same applies to ReadOnly and Required.

public FieldFlags Flags { get; set; }

Property Value

FieldFlags

Form

The form the field belongs to.

public PdfAcroForm Form { get; }

Property Value

PdfAcroForm

FullName

Fully qualified name, e.g. "address.street".

public string FullName { get; }

Property Value

string

PartialName

The field's own name (/T) without the names of its parents; "" if not set.

public string PartialName { get; }

Property Value

string

ReadOnly

Gets or sets the ReadOnly flag.

public bool ReadOnly { get; set; }

Property Value

bool

Required

Gets or sets the Required flag.

public bool Required { get; set; }

Property Value

bool

ToolTip

Description shown as tooltip and read by screen readers (/TU, required by PDF/UA).

public string? ToolTip { get; set; }

Property Value

string

Value

The field value as text (for buttons: the selected state name, "Off" if unchecked).

public virtual string? Value { get; set; }

Property Value

string

Widgets

The widget annotations (visible instances) of the field.

public IReadOnlyList<PdfWidget> Widgets { get; }

Property Value

IReadOnlyList<PdfWidget>

Methods

RegenerateAppearance()

Regenerates the appearance streams of all widgets from the current value.

public virtual void RegenerateAppearance()

ToString()

Returns the field type, full name and value, for debugging.

public override string ToString()

Returns

string