SetXFAFromString

Form fields

Description

Sets the document's XFA form data to the specified XML string as a complete XML Data Package stream under /AcroForm/XFA; UTF-8 and UTF-16 encoded XML packets are decoded before field access, the function creates an AcroForm container when needed and stores the PDF as PDF 1.5 or later

PDF/X modes reject XFA before creating or changing the AcroForm and return 0

Syntax

Delphi

Function TPDFlib.SetXFAFromString(Const Source: AnsiString; Options: Integer): Integer;

DLL

int DLSetXFAFromString(int InstanceID, const char * Source, int Options);

Parameters

SourceThe XML string to store as complete XFA form data
OptionsReserved for future use; set to 0

Return values

0The XFA form data could not be set or the document is in PDF/X mode
1The XFA form data was set successfully