pub struct WidgetAnnotation {
pub field_name: String,
pub field_type: Option<FieldType>,
pub value: Option<FieldValue>,
pub default_value: Option<FieldValue>,
pub flags: Option<i32>,
pub max_len: Option<i32>,
pub options: Option<Vec<ChoiceOption>>,
pub quadding: Option<i32>,
pub default_appearance: Option<String>,
}Expand description
/Widget annotation payload — also acts as the field dict when the
widget is a single-leaf field (the common case). Multiple widgets
sharing the same dotted field_name become
/Kids of an implicit parent field at write time (radio groups).
Fields§
§field_name: String/T — fully qualified field name. Dot-separated segments imply
nesting (order.shipping.street → parents order →
order.shipping and a leaf street). The PDF emitter renders
only the last segment as /T; PDF resolves the full name by
walking the /Parent chain.
field_type: Option<FieldType>/FT field type. Optional — when absent the field inherits its
type from the parent. Required on root fields.
value: Option<FieldValue>/V field value — variant shape depends on /FT. Optional.
default_value: Option<FieldValue>/DV default value — same shape rules as value.
flags: Option<i32>/Ff field flags (PDF 1.7 spec § 12.7.3.1). Bit semantics
vary by /FT; passed through verbatim.
max_len: Option<i32>/MaxLen — text-field-only character limit.
options: Option<Vec<ChoiceOption>>/Opt — choice-field options. Each entry is either a single
display string (export = display) or [export display] pair.
quadding: Option<i32>/Q quadding: 0=left, 1=center, 2=right.
default_appearance: Option<String>/DA default appearance string. Falls back to the form-level
/DA (or 0 0 0 rg /Helv 10 Tf when neither is set) at write
time.
Trait Implementations§
Source§impl Clone for WidgetAnnotation
impl Clone for WidgetAnnotation
Source§fn clone(&self) -> WidgetAnnotation
fn clone(&self) -> WidgetAnnotation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more