ImportFormDataFromFDFString
Form fields
Description
Parses an FDF (Forms Data Format) /Fields array and applies each field value to the matching AcroForm field by title. Each FDF entry has the form << /T (FieldName) /V (FieldValue) >>; the parser inverts the PDF literal-string escaping (parentheses, backslash, and \ddd octal). This closes the previous asymmetric gap where ExportFormDataToFDFString existed but no import path did.
PDF literal text strings are decoded before matching field names or assigning values, including UTF-16BE strings with a byte-order mark
A field entry without /V leaves the existing value unchanged; an explicit empty value such as /V () clears it
Syntax
Delphi
Function TPDFlib.ImportFormDataFromFDFString(Const FDF: AnsiString): Integer;
Parameters
| FDF / FDFFileName | The FDF content as a string, or the path to an FDF file |
|---|
Return values
| >= 0 | The number of fields whose value was set (matched by title) |
|---|