PdfFormField

One terminal interactive-form field (ISO 32000-1 §12.7.3), flattened from the AcroForm field tree with inheritable attributes (/FT, /DA, /Ff, /V, /Q) resolved down from ancestors.

A field and its single widget annotation are frequently merged into one dictionary; when they are separate (e.g. one logical field with widgets on several pages) fieldReference and widgetReference differ. The writer's form-fill uses these references plus rect (the widget's /Rect) to set the value and regenerate the appearance.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
Link copied to clipboard
class Widget

One place a field is drawn: its annotation, its rectangle, and the reference to reach it.

Properties

Link copied to clipboard

The scripts of the field's first widget, or of the field itself when the two are merged.

Link copied to clipboard

Variable-text default appearance string (/DA), inherited if absent.

Link copied to clipboard

The value the field goes back to when the form is reset (/DV), or null when it has none.

Link copied to clipboard

Indirect reference to the field dictionary, for editing.

Link copied to clipboard
val flags: Int

Field flags (/Ff), inherited if absent.

Link copied to clipboard

Fully-qualified name: ancestor partial names joined by '.'.

Link copied to clipboard

/Ff bit 13 (text fields): multi-line.

Link copied to clipboard

/Ff bit 1: the field is read-only.

Link copied to clipboard

How many characters a text field takes (/MaxLen), or null when it does not say.

Link copied to clipboard

The choices of a list box or a combo box, in the order the file lists them (/Opt, ISO 32000-1 §12.7.4.4). Empty for every other kind of field.

Link copied to clipboard

This field's own /T, or null for an anonymous node.

Link copied to clipboard

Quadding for variable text (/Q): 0 left, 1 centre, 2 right.

Link copied to clipboard

The first widget's /Rect, or null when this terminal field has no widget.

Link copied to clipboard

The text a viewer shows when the pointer rests on the field (/TU), or null.

Link copied to clipboard
Link copied to clipboard

/V rendered as text (text fields) or the selected name (buttons/choices).

Link copied to clipboard

Indirect reference to the widget annotation (== fieldReference when merged).

Link copied to clipboard

Every widget annotation this field owns, in the order the field declares them. One field may be shown in several places: a radio group has one widget per button, and a field may repeat on several pages (ISO 32000-1 §12.7.3.1). The first entry is the one rect, widgetReference and widgetDict describe.

Functions

Link copied to clipboard
open override fun toString(): String