XFA


XFA stands for XML Forms Architecture, a family of proprietary XML specifications that was suggested and developed by JetForm to enhance the processing of web forms. It can be also used in PDF files starting with the PDF 1.5 specification. The XFA specification is referenced as an external specification necessary for full application of the ISO 32000-1 specification. The XML Forms Architecture was not standardized as an ISO standard, and has been deprecated in PDF 2.0.

Overview

XFA's main extension to XML are computationally active tags. In addition, all instances created from a given XFA form template keep the specification of data capture, rendering, and manipulation rules from the original. Another major advantage of XFA is that its data format allows compatibility with other systems, and with changes to other technology, applications and technology standards.
According to JetForm's submission to the World Wide Web Consortium, "XFA addresses the needs of organizations to securely capture, present, move, process, output and print information associated with electronic forms." The XFA proposal was submitted to the W3C in May 1999.
In 2002, the JetForm Corporation was acquired by Adobe Systems, and the latter introduced XFA forms with PDF 1.5 and the subsequent Acrobat releases in 2003.
XFA forms are saved internally in PDF files or as XDP files which can be opened in Adobe's LiveCycle Designer software.
An XDP can package a PDF file, along with XML form and template data. XDP provides a mechanism for packaging form components within a surrounding XML container.
Although XFA can make use of PDF, XFA is not tied to a particular page description language.
The XFA specification includes an appendix that discusses details of the Adobe-specific XFA implementation and behaviors of Adobe products that deviate from the XFA specification.
Data filled in an XFA form may be submitted to a host using an HTTP POST operation in XDP format, PDF format, XFDF format, XML 1.0 format or as an URL-encoded format.
XFA supports the use of XSLT to transform the XML data before it is loaded to XFA Data DOM or after it is unloaded from XFA Data DOM.
One of XFA approaches to pagination duplicates the pagination logic and much of the syntax of XSL-FO.
XFA forms are synonymous with SmartForms in the Australian government.

Static and dynamic forms

XFA defines static forms and dynamic forms.
In a static form the form’s appearance and layout is fixed, regardless of the field content. Any unfilled fields are present in the form. By default, static forms does not require re-rendering. XFA recognises two types of static forms: "old-style static forms" and XFAF.
Dynamic forms can change in appearance in several ways in response to changes in the data. Dynamic form requires rendering of its content on file opening. Dynamic forms may also be designed to change structure to accommodate changes in the structure of the data supplied to the form. For example, a page of a form may be omitted if there is no data for it. Another example is a field that may occupy a variable amount of space on the page, resizing itself to efficiently hold its content. Dynamic form cannot rely on a PDF representation of its boilerplate, because the positioning and layout of the boilerplate change as the fields grow and shrink or as subforms are omitted and included.

Usage with Portable Document Format

PDF 1.7 supports two different methods for integrating data and PDF forms.
Adobe XFA Forms are not compatible with AcroForms. When an XFA is packaged inside a PDF file, it is placed in the AcroForm document resources dictionary or referenced from the AcroForm entry in the document catalog.
Creating XFA Forms for use in Adobe Reader requires Adobe LiveCycle Designer. Adobe Reader contains "disabled features" for use of XFA Forms, that will activate only when opening a PDF document that was created using enabling technology available only from Adobe. The XFA Forms are not compatible with Adobe Reader prior to version 6.

Profiles

Starting with XFA 2.5 forms can use a subset of the full XFA capability. Currently the only specified is the XFAF profile.
XFA can be used as:
XFA forms can be created and used as PDF 1.5 - 1.7 files or as XDP. The format of an XFA resource in PDF is described by the XML Data Package Specification. PDF may contain XFA in XDP format, but XFA may also contain PDF.
When the XFA grammars used for an XFA form are moved from one application to another, they must be packaged as an XML Data Package. The XDP may be a standalone document or it may in turn be carried inside a PDF document.
XFA Form packaging variants :
Packaging an XDP within PDF has the advantage that it is more compact, because PDF is compressed. XDP in PDF can be digitally signed in ways that a standalone XDP cannot.
In contrast, packaging form components within an XML container makes it easy for standard XML applications to work with XFA forms. The XML components are human readable and easy editable. When in XDP form, an XFA document may be validated using schemas attached to XFA specification.

Compatibility

Most PDF processors do not handle XFA content. When generating a shell PDF it is recommended to include in the PDF markup a simple one-page PDF image displaying a warning message. PDF processors that can render XFA content should either not display the supplied warning page image or replace it quickly with the dynamic form content.
In 2013, as a solution for mobile platforms and desktop platforms without XFA support, Adobe created software that creates online HTML5 fillable forms from XFA. Mobile Forms are not a single file like a PDF or XDP.

Rich text

Rich text may appear in data supplied to the XFA forms, in XFA templates as default text values, as field captions, or as boilerplate content.
Starting with PDF 1.5, the text contents of variable text form fields, as well as markup annotations, may include formatting information. These rich text strings are XML documents that conform to the rich text conventions specified for the XML Forms Architecture specification, which is itself a subset of the XHTML 1.0 specification, augmented with a restricted set of CSS2 style attributes.
In PDF 1.6, PDF supports the rich text elements and attributes specified in the XML Forms Architecture Specification, 2.2. In PDF 1.7, PDF supports the rich text elements and attributes specified in the XML Forms Architecture Specification, 2.4. It was announced in 2011 that PDF 2.0 would reference XFA 3.1, but when published, PDF 2.0 deprecated it.

PDF/A

When an XFA form is converted to PDF/A, both the boilerplate and field content are flattened into a PDF appearance stream. PDF/A forbids active content and all XFA content except, optionally, the XML Data Document.

Standardization

The XML Forms Architecture specification is not included in the PDF 1.7 standard and it is only referenced as an external proprietary specification created and published by Adobe. However, the ISO 32000-1 references XFA as normative and indispensable for the application of the ISO 32000-1 specification. XFA was not standardized as an ISO standard.
Since 2007, development of PDF standard has been conducted by ISO's Technical Committee 171/Subcommittee 2/Working Group 8.
In 2011 the ISO Committee urged Adobe Systems to submit the XFA Specification, XML Forms Architecture, to ISO for standardization, and requested that Adobe Systems stabilize the XFA specification. The Committee expressed its concerns about the stability of the XFA specification.
In 2017 the ISO Committee deprecated XFA from PDF 2.0.

XFA versions

XFA versionYear of publicationReferenced in PDF versionNew featuresAdobe Acrobat versionAdobe Designer version
2.0220031.5XFA 2.0 supports only static forms6.06
2.1Connection Set DOM, Connection Data DOM, Data Description DOM, Layout DOM, Connection Set DOM, Connection Data DOM, Data Description DOM, Layout DOM, Special Object Models, Exclusion group element’s capability expanded, Hide/reveal containers depending on relevance, Growable containers, Paragraph formatting, Barcode formatting, Image aspect, Noninteractive fields, Support for Web Services, Submission of form parts to a target URI, Subforms may include calculations, Calculations may specify override conditions, Scripts specify whether they should be executed on the client, server or both, Document variables, Validation checks against validation-specific picture clauses, Event source included as an event attribute, Use of data description when writing out XML, Dynamic forms, Repeating subforms, Explicit data references, Subform sets, Record processing, Global fields, Data description element, Default data binding to include attribute data, Subform scope option, Automatically breaking layout, Dynamic layout, Flowing layout strategy, Flowing layout support for tables and table-rows, Rich text: Embedded objects, Subscript and superscript support, New Widget Types, Support for Asian-Language Representations, Scripting Object Model: Referencing objects by their class names, FormCalc: New functions to access locale
2.220041.6Connection Set DOM, Connection Data DOM, Event for populating drop-down choice list widgets, W3C XML digital signatures, Uniquely identifying templates, Document variables used as named script objects7.07
2.420061.7 and ISO 32000-1Form fragments, Bar code encryption, Barcode character encoding, URL-encoded option for submit, Choice-list enter and exit events pair up, Manifests as scripting variables, Complex binding, Conditional binding, Support for right-to-left text flow, Conditional breaking, Nesting tables, Captions can differ between views7.07.1
2.520071.7 Adobe Extension Level 1Secure submit, Index change event, XFA Foreground , Change to initial page selection, Explicit control of printer pagination, Widget functionality: Control over scrolling, Checkmark shapes, Button highlight, Explicit control over number of cells in combs, Security and Control: MDP+ document signatures8.08
2.620081.7 Adobe Extension Level 2Adobe XMP documented, Adobe configuration syntax documented, Template version control, Adobe legacy flags documented, Image storage in PDF, New barcode types 8.1, 8.1.1ES 8.1
2.720081.7 Adobe Extension Level 3Locale set typefaces, New set of rules for picking alternate fonts8.1, 8.1.1ES 8.1.2
2.820081.7 Adobe Extension Level 3New variables dataset, Form fragments declaring traversals, Access property extended to subforms, Improved orphan and widow control, Keep property extended to fields and draws, Authentication policy for web services, Submit via WSDL/SOAP, Pre- and post-submit events standardized, Pre-sign and post-sign events added, Pre- events may cancel the associated action, Change in keep behavior, Pair kerning support, Hyphenation support, Rich text: Outbound hyperlinks9.0ES 8.2
3.020091.7 Adobe Extension Level 5Compatibility flag override in LiveCycle, Inactive presence, Event propagation, Validation events added, Global validation handling control9.1
3.120091.7 Adobe Extension Level 6Support for relational data, Data injection into data description, Barcode examples expanded and illustrated, Automation Examples expanded and corrected, Control over duplex imposition, Rendering: Support for long or short edge duplexing, Support for more label printersX ES 2
3.320121.7 Adobe Extension Level 8Bulleted List, Numbered List and Nested List Support, Support for Right To Left flowed content Subforms and Tables, Deprecating legacy rendering, XML Encryption and Decryption Support, autoSave element added, ADBE_JSConsole and ADBE_JSDebugger elements added, Flash Integration in XFAX ES 3