Component: TPdf · Unit: PDFium
function SetFocusedFormFieldText(const Value: WString): Boolean;
Writes text into the currently focused form field's edit buffer via FORM_ReplaceSelection, symmetric to FocusedFormFieldText which reads back the same buffer
Remarks
- Requires a focused field; returns False if FocusedFormFieldIndex is less than zero or no page is active
- For AcroForm text and combo fields the value is committed to the /V entry when focus leaves the field, so it persists when the document is saved
- For XFA text fields the write lands only in the in-memory edit buffer — PDFium exposes no public API to reconcile XFA values back to the datasets packet, so an XFA write does not persist when the document is saved (see GetXfaDatasets for the read-side limitation)
- Internally calls FORM_SelectAllText and then FORM_ReplaceSelection to overwrite the current selection
See Also