Polymorphic setter: the semantics depend on the field's type.
Arguments
- field
A
pdfium_form_fieldfrompdf_form_fields(). Parent doc must be readwrite.- value
Character scalar OR logical scalar (for checkable types). See type-specific rules above.
Details
Text (
"textfield","xfa_textfield"):valuemust be a character scalar. Sets/Vdirectly.Checkbox / radio (
"checkbox","radiobutton","xfa_checkbox"):valuemay be either a logical scalar or a character scalar.TRUEwrites the field's on-state name (inferred from the current/Vor/AS, falling back to"Yes");FALSEwrites"Off". A character value is written literally — useful when you already know the export-value string and want to bypass inference.Combobox / listbox (
"combobox","listbox","xfa_combobox","xfa_listbox"):valuemust be a character scalar matching one of the field's options (pdf_form_field_options()).
Any other field type (button / signature / unknown) errors — those don't have a settable value.
Wraps FPDFAnnot_SetStringValue(annot, "V", ...) followed by a
rect re-touch (FPDFAnnot_SetRect to the current rect) that
flips the AP-dirty flag, so the next pdf_render_page() or
pdf_save() rebuilds the widget's appearance stream from the
new value.