Skip to main content

Module form_fields

Module form_fields 

Source
Expand description

PDF interactive form fields (AcroForm).

AcroForm declares interactive fields — text inputs, checkboxes, radio buttons, choice lists, signatures — at the document level. Each terminal field has a fully-qualified name (parent names joined with .) and one or more widget annotations that give it a visible presence on a page.

FormCatalog is the top-level container; FormField is a single field (terminal or non-terminal container) with type-tagged data in FieldKind.

§Cross-linking with annotations

Each terminal field carries a list of widget object numbers (FormField::widget_obj_nums). Consumers that want the corresponding Annotation data look up matching annotations on each page via PdfDocument::page_annotations; the annotation whose source object number equals the widget’s is the one to use.

Structs§

ButtonField
/FT /Btn — pushbutton, checkbox, or radio button.
ChoiceField
/FT /Ch — list box or combo box.
ChoiceOption
One entry in /Opt.
FieldFlags
/Ff flags shared by all field types.
FormCatalog
Top-level AcroForm dictionary.
FormField
One form field — terminal (has a value) or non-terminal (container).
SigFlags
/SigFlags bit field.
SignatureField
/FT /Sig — digital signature.
TextField
/FT /Tx — text input.

Enums§

ButtonType
Resolved button kind (pre-classified for caller convenience).
FieldKind
Field type plus subtype-specific data.
FieldValue
Field value. PDF stores values type-erased; the form-walker maps each /V (or /DV) to one of these variants based on the field type and the value’s PDF type.

Functions§

parse_acroform
Parse the document’s /AcroForm if present.