AcroForms vs XFA Forms
AcroForms are the fillable forms that are used to integrate the form fields in PDF documents. It was the initial forms technology adopted by Adobe for the PDF documents starting from PDF 1.2 specification. AcroForms allow adding the form fields as an overlay to collect the data from the end-users or anyone using the document.
Later, Adobe adopted the XML-based XFA forms (XML Forms Architecture) as part of the PDF 1.5 specification after acquiring Accelio (a service provider). XFA used the capabilities of the XML for developing the e-forms in PDF documents. However, despite being a newer e-form technology as compared to AcroForms, XFA has a few limitations which include:
- lack of JavaScript support with various PDF objects,
- XFA forms can be created with Adobe LiveCycle Forms Designer only,
- compatibility issues with the AcroForms,
- lack of an automatic conversion from AcroForms to XFA,
- limited accessibility as compared to AcroForms,
- requires developer skills to build the forms,
- and etc.
Since AcroForms technology is considered to be more accessible and easy to use, the upcoming section shows how to perform XFA to AcroForms conversion in PDF programmatically using C# and Java.
Convert XFA to AcroForms
Various XFA to AcroForms conversion tools are available that will let you perform the conversion. However, in order to integrate this feature within your .NET or Java application for automated conversion, you can use Aspose.PDF.
Convert XFA to AcroForms in C#
The following are the steps to convert XFA forms to AcroForm using Aspose.PDF for .NET.
- Load the PDF document having XFA forms using Document class.
- Set Document.Form.Type property to FormType.Standard.
- Save the new documents using Document.Save(string) method.
The following code sample converts XFA forms in PDF to AcroForms using C#.
Convert XFA to AcroForms in Java
The following are the steps for XFA to AcroForms conversion using Aspose.PDF for Java.
- Load PDF with XFA forms using Document class.
- Set form type to FormType.Standard.
- Save the updated document using Document.save(string) method.
The following code sample shows how to convert XFA to AcroForms using Java.
Learn more about Aspose.PDF
You can learn more about the Aspose.PDF API using the documentation. In case you would have any questions or queries, contact us via our forum.