THotPDF.ImportLoadedFormFromFDF Method
Imports field values from an FDF file into matching loaded fields, including arrays for multi-select choice fields
The import uses a nested graph transaction and rolls back every earlier update if an exception escapes; existing compatibility rules still skip unknown fields and rejected values, whilst strict interchange import rejects those errors
Declaration
function ImportLoadedFormFromFDF(const AFileName: TFileName): Integer;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
AFileName | File path used as the source or destination for this operation |
Return value
Returns the number of fields updated
Usage notes
- Fills PDF forms automatically
- An explicit empty array clears the selection, including when an option has an empty export value
- Arrays require a multi-select choice field and direct string elements; unresolved references, nested arrays, and non-string items are rejected
- Retains the file API's existing skip behaviour for missing fields and rejected updates; its legacy empty scalar values are also skipped
- Request appearance regeneration explicitly before saving when text or choice appearances must change