How to Work With AcroForms & XFA

How to Work With AcroForms & XFA

Published November 28, 2023

PDF form documents can use two format types, Adobe Acrobat Forms, or AcroForms, and XML Forms Architecture, or XFA. Adobe developed AcroForms in 1998. AcroForm is the original PDF forms technology and it remains the primary method for building PDF forms documents today. XFA is a set of proprietary XML specifications for use with web forms. Adobe also owns the XFA format, and XFA forms can be saved internally in PDF files. Unlike AcroForms, XFA forms can allow text reflow, so that text fields can resize to allow more content if needed. Dynamic XFA forms can also be interactive, as the form document is built using a series of templates. The form document can respond to the information that a user enters or selects and display a different set of form fields relevant to the user’s answer.

What is an AcroForm?

AcroForms, short for "Acrobat Forms," are a type of interactive form used in PDF documents. They are a standard feature in PDF technology and are supported by a wide range of PDF viewers and software. AcroForms allow users to create, fill out, and submit forms electronically within a PDF file. Here are some key characteristics and features of AcroForms:


  • Interactive Form Fields: AcroForms include various types of interactive form fields, such as text fields, checkboxes, radio buttons, and dropdown lists, that users can fill out with text, numbers, or selections.
  • Form Submission: Users can submit the filled-out forms electronically, typically via email or a web server. This makes AcroForms useful for applications like online surveys, job applications, and more.
  • Form Validation: AcroForms can include validation rules to ensure that users enter data in the correct format. For example, you can set a text field to accept only numerical values.
  • Digital Signatures: AcroForms support digital signatures, allowing users to electronically sign the document, providing authenticity and integrity of the form.
  • Data Extraction: The data entered into AcroForms can be extracted for further processing, making them valuable for data collection and analysis.
  • Compatibility: AcroForms are widely supported by various PDF software, making them accessible to a broad audience.


AcroForms are a straightforward and reliable way to create and work with interactive forms in PDFs, making them a popular choice for many form-based applications.
 

Read Converting XFA Forms to PDFs: What Are Your Options?

What is an XFA Form?

In contrast to AcroForms, XFA (XML Forms Architecture) forms are another type of interactive form technology in PDFs. They use XML-based scripting and offer more advanced features for dynamic forms. However, XFA forms are not as universally supported as AcroForms.


Key characteristics of XFA forms include:


  • Rich Interaction: XFA forms can offer more advanced and dynamic interactions compared to AcroForms (traditional PDF forms). They support features like conditional logic, dynamic content, calculations, and data binding.
  • Data Integration: XFA forms can be designed to connect with databases, web services, or other data sources. This allows for the automatic population of form fields and the submission of form data to external systems.
  • Complex Layouts: XFA forms can have more complex and adaptable layouts, making them suitable for creating sophisticated forms that adjust to different screen sizes and orientations.
  • Scripting: XFA forms often use scripting, such as JavaScript, to control form behavior, validation, and calculations.
  • Dynamic Content: They can display or hide form elements based on user input or data conditions, which is helpful for creating smart forms.
  • Extended Form Elements: XFA forms support various interactive elements like text fields, checkboxes, radio buttons, digital signatures, and more, similar to AcroForms.


While XFA forms offer powerful capabilities, they have some limitations. Not all PDF viewers and software fully support XFA, which can lead to compatibility issues. In cases where broad compatibility is essential, you may need to convert XFA forms into standard PDFs (flattening) or consider using AcroForms for simpler form requirements. 

Read XFA Form Editing: What You Need to Know

XFA  Form Complexities

Commonly, a PDF form using XFA can be opened and viewed in Acrobat, but not edited. Users who try to open an XFA form in a viewing tool that is not specifically designed to interpret XFA will see an error message. AcroForms are compatible with a much wider range of software applications, as well as with Acrobat itself. Further, XFA was deprecated in the new PDF 2.0 format and is not permitted for use with special ISO formats for PDF documents such as PDF/A, or PDF Archive. Google Chrome and most other browsers will not display XFA documents, and XFA is not supported on mobile devices.


Meanwhile, the dynamic field capacity of XFA forms is the only feature that XFA offers that is not available in AcroForms. The excellent support for JavaScript in AcroForms allows you to make an AcroForms form document interactive if that’s what you need. Additionally, you can’t properly print a PDF form using XFA if the fields are expanded, as the extra characters entered in the fields won’t show up on paper.

Working with Both PDF Form Types

The XFA format is being phased out, and the standard for managing forms within PDF files in the future will be AcroForms. We point this out because some users still work with XFA form technology, and we have tools that were designed to manage and convert XFA form documents. However, knowing to rely on AcroForms rather than XFA is important if you will be building or manipulating PDF documents programmatically in the future. At Datalogics, we have several different tools to help you work with XFA and AcroForm, including our flagship SDK, Adobe PDF Library. 


Read 10 Reasons to Convert XFA to PDF