Static, Dynamic and Acro, Oh My! Becoming a Wizard at PDF Forms
You just want the PDF forms to work. That’s not asking a lot, is it?
Depends on the forms.
You have PDFs you are unable to open, view and print, you can’t e-sign, can’t add OCR, and don’t even consider importing or exporting forms data or adding dynamic bar codes.
Why is this happening? As a result of the different capabilities and limitations of XFA, AcroForms and LiveCycle (tech support discontinued in 2018), it may be challenging to render, print, export, import or convert forms data from one format to another, or to reader enable your PDFs so that your users can open and complete these functions in Adobe Reader. XFA documents need to be updated to PDF documents that can be opened, viewed and edited. Most of these are legacy documents as it is rare – although not completely unheard of – for companies to build workflows using new XFA forms documents. In fact, most organizations just want to be able to archive legacy forms for future use.
Understanding the Technology: AcroForms vs. XFA
Forms in a PDF file typically come as one of two forms: as AcroForms or as XFA forms. AcroForms are created with PDF operators and are designed to co-exist with other page contents in PDF files. AcroForms were introduced in PDF 1.2 and underwent significant extension through the next several PDF specifications; the syntax for AcroForms is well defined in the ISO 32000 PDF standard. AcroForms are the forms created by Adobe Acrobat when one adds form fields to a PDF file and are generally compatible with PDF workflows, whether Adobe workflows or third-party PDF processing tools.
AcroForm appearances are defined through PDF marking operator defaults and its elements define a default appearance string dictionary that sets up an initial graphics state and content stream that is used for formatting the form data for display. Form data is merged with the content stream to define the appearance.
XFA forms use an XML syntax to define the elements and behaviors of a form. These XML-based forms are not directly parsable by PDF language parsers. In order to work with XFA, the forms must be extracted and processed with an XML-based workflow.
Read Legacy XFA Forms: How to Optimize them for Successful PDF Workflows to learn more about working with XFA.
XFA forms come in two important varieties:
Static XFA Forms
Static XFA forms use PDF marking operators to define the base appearance of the page and form (the boilerplate) and XFA grammar to define the form logic, form field appearances and the data values stored in the form. This allows creators greater control over the appearance of the form and allows form creation programs the ability to include a default PDF appearance for form elements - this is referred to as the normal appearance. The normal appearance, if present, allows PDF workflows to render/print the file and to flatten (remove the form elements and interactivity while preserving the appearance and data) the XFA form. Static XFA forms are sometimes referred to as XFAF (XFA foreground) forms, as they allow for a PDF-based background on the pages in the file.
Dynamic XFA Forms
Dynamic XFA forms use XML syntax to define both the page appearance (boilerplate) and the form elements. Dynamic XFA forms can change their structure (size and number of form fields) based on data. Dynamic XFA forms cannot use PDF markup to control their appearance, however, and cannot co-exist with PDF based pages. These forms are handled entirely through an XML workflow and are not compatible with PDF interpreters. Instead, dynamic XFA forms use the PDF file format essentially as a data container for their XML form data.
Important Note on Rendering AcroForms, Static XFA & Dynamic XFA Forms: For a PDF rendering engine to show a form, the form needs to have a defined appearance. AcroForms and static XFA forms may define normal appearances for form elements; if present, these are sequences of PDF marking operators that may be used to render a representation of the form element. Form elements that do not have normal appearances will not be rendered by PDF rendering engines unless they have logic to generate appearances for the form elements. Note that normal appearances are defined on a per-element basis, meaning that some elements may have these, and others may not. Adobe Acrobat and Reader use the normal appearances for viewing form elements if they are present. Dynamic XFA forms cannot have a normal appearance and cannot be rendered by a PDF rendering engine. Dynamic XFA forms will typically cause a PDF rendering engine to display a dummy page asking the user to upgrade their copy of Reader or Acrobat.
Bottom line is, most PDF forms documents today use AcroForm, as AcroForm is compatible with a much wider range of software applications, as well as with Acrobat itself. But there are still millions of XFA forms out there – particularly in industries that may not be able to shift technologies easily or lack the budget to do so. For example, many governments around the world still have XFA forms. Government agencies still use a lot of legacy documents and systems that create XFA form content, and a huge issue for government agencies involves data security. They need to be able to use, archive and store forms documents so that nobody can make changes to these documents later. What’s a developer to do? Find software that can fix the dang forms, that’s what.
The software needs to be able to flatten form to provide access to the document while preserving the document content including barcodes and annotations. It needs to be able to convert static XFA and dynamic XFA forms to AcroForms to give you access to the form data, and the ability to import and export data for use in ERP, CRM and other types of databases. It also must have the ability to batch-process forms unless you want to sit there all day and do it manually.
Using a PDF SDK to manage forms gives you access to those legacy forms and streamlines your forms processes without spending time and money on extensive internal development and programming.
Read XFA Form Editing: What You Need to Know
Considerations When Evaluating Forms Software
What types of forms do you have and what do you need to do with them? Make sure when choosing PDF forms software, you compare capabilities very closely.
- XFA Form Converter: Do you need to convert interactive XFA form content to a "flat PDF" so that the XFA content in a PDF can be consumed and processed by PDF processors?
- Flat PDF = PDF is view-only; interactivity is replaced by a static file
- PDF with AcroForms = PDF is viewable AND the forms are interactive
- Acroform Converter: Do you need to convert PDFs with AcroForms to flat PDFs so the AcroForm content is view-only and can be consumed and processed by PDF processors?
- Flat PDF = PDF is view-only; interactivity is replaced by a static file
- XFA Barcode Converter: Do you need to convert barcodes (including QR codes) generated by XFA forms into standard PDF consumable barcodes, images, commands, and outcomes so that the visual representations of XFA form data remain intact and can be consumed and processed by PDF processors?
- Data Importer: Are you importing field-level form data, from external data sources, into PDFs that use the form types below to reduce manual errors and processing time? Can the software you are comparing do this for static XFA, dynamic XFA and/or AcroForms?
- Data Exporter: Are you exporting field-level form data to populate external data sources, to reduce manual errors and processing time, and does it work with static XFA, dynamic XFA and/or AcroForms?
- Annotation Preserver: Can the software handle annotations made within PDFs to ensure that the annotations are visible with the PDF regardless of the PDF viewer?
Quick Use Case Examples
Education
- Use PDF forms with QR Codes for thesis registration at the faculty business information system.
Finance
- Extract data and flatten to a "normal" PDF for a finance workflow.
- Flattening XFA documents to add watermarks.
- Adding QR codes to financial documents.
Government
- Form flattening for military applications.
- Batch convert XFAs to PDFs for the immigration documents.
Printing
- Flatten transparencies in a specific page range within a PDF file for print.
- Flatten XFA forms and splitting into individual PDFs for uploading to storage and viewing online.
Real Estate
- Import data from a file and fill in all the XFA forms automatically for home appraisals for brokers.
Software
- Building a PDF cloud service internally to fill regulatory PDF for both FDA and EMEA, both of which have XFA forms.
- Flattening XFA used for purchase orders, contracts or invoices into PDF.
Forms automation supports vital workflows and can extend beyond the company to include vendors, employees, and customers. Fillable forms are not only important to activities such as hospital admissions and insurance claims, but they often need to interact with enterprise applications like ERP or CRM systems. However, PDF forms have changed dramatically over the years which can leave developers in a lurch. This article will outline the types of forms you may encounter while developing PDF workflows and how to manage new forms and legacy forms.
Why do developers use Adobe PDF Library Forms Extension SDK?
Adobe PDF Library Forms Extension SDK extends digital document support to PDFs to quickly and easily import and export form data, lock completed forms to prevent editing, fill databases with forms data, and provide consistent viewing experiences across all devices. Powered by the same source code used for Acrobat, it supports both static XFA and dynamic XFA forms, and provides the same viewing experience you have come to expect from Adobe.
Sign up for a free trial of our Adobe PDF Library Forms Extension SDK and start on your proof of concept today.
Join us on Discord | Schedule a Call with an Engineer | Ask Scout, our Friendly AI Assistant