Class PdfFormField
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
Dictionary
The terminal field dictionary.
public PdfDictionary Dictionary { get; }
Property Value
FieldType
"Tx", "Btn", "Ch" or "Sig".
public string FieldType { get; }
Property Value
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
Form
The form the field belongs to.
public PdfAcroForm Form { get; }
Property Value
FullName
Fully qualified name, e.g. "address.street".
public string FullName { get; }
Property Value
PartialName
The field's own name (/T) without the names of its parents; "" if not set.
public string PartialName { get; }
Property Value
ReadOnly
Gets or sets the ReadOnly flag.
public bool ReadOnly { get; set; }
Property Value
Required
Gets or sets the Required flag.
public bool Required { get; set; }
Property Value
ToolTip
Description shown as tooltip and read by screen readers (/TU, required by PDF/UA).
public string? ToolTip { get; set; }
Property Value
Value
The field value as text (for buttons: the selected state name, "Off" if unchecked).
public virtual string? Value { get; set; }
Property Value
Widgets
The widget annotations (visible instances) of the field.
public IReadOnlyList<PdfWidget> Widgets { get; }
Property Value
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()