pub struct FormField {
pub name: String,
pub kind: FieldKind,
pub flags: i64,
pub value: Option<FieldValue>,
pub default_appearance: Option<String>,
pub quadding: i64,
pub max_len: Option<i64>,
pub options: Vec<(String, String)>,
pub widgets: Vec<ObjectId>,
}Expand description
A terminal interactive-form field.
Fields§
§name: StringFully-qualified name: the /T partial names of this field and its
ancestors joined by . (PDF 12.7.3.2).
kind: FieldKind§flags: i64/Ff field flags (inherited).
value: Option<FieldValue>/V value (inherited).
default_appearance: Option<String>/DA default appearance string (inherited, falling back to the
AcroForm-level /DA).
quadding: i64/Q quadding: 0 left, 1 centered, 2 right (inherited).
max_len: Option<i64>/MaxLen (text fields) — also the comb cell count.
options: Vec<(String, String)>/Opt (export, display) pairs (choice fields). For plain-string
options the two halves are equal.
widgets: Vec<ObjectId>Widget-annotation object ids that present this field on a page. When the field dict is itself the widget (the common single-widget case), this is the field’s own object id.
Implementations§
Source§impl FormField
impl FormField
Sourcepub fn display_value(&self) -> Option<String>
pub fn display_value(&self) -> Option<String>
The string a renderer should draw for this field, or None when there
is nothing to show (no value, the Off button state, or empty text).
Choice values (which store the /Opt export value) are mapped to their
human-visible display label (PDF 12.7.4.4).