XFA Forms

XFA Forms

XFA (XML Forms Architecture) is a legacy PDF form technology defined by an XML description embedded within the PDF file. XFA forms are distinct from AcroForm fields and are rendered by an XML-based layout engine.

XFA vs AcroForm

FeatureAcroFormXFA
StandardISO 32000-1XFA 3.x
Field APIForm, RadioButtonField, etc.XML-based
PDF/A compatibleYesNo
RecommendedYesLegacy

Aspose.PDF FOSS for Java supports both form types. For new form development, AcroForm is recommended as it is the current ISO standard. See Interactive Forms for the AcroForm API.

Accessing XFA Data

XFA form data is embedded in the document’s AcroForm as an XML stream. The Document class provides access to the underlying AcroForm via Document.getForm(), from which the XFA XML data stream can be reached through the form’s XFA property.

For modern fillable form development, use the AcroForm API (RadioButtonField, CheckboxField, TextBoxField) as these are ISO-standard and work in all PDF viewers.

See Also