A FAQ
The "P" in PDF stands for "Portable", and PDF is now an ISO Specification. So you could be forgiven for being surprised when you learn about XFA. We're asked about it a lot so what follows is a bit of a FAQ.
What is XFA
XFA stands for "XML Forms Architecture", and it's been part of Acrobat since Acrobat 6. It's an XML syntax which defines the document (the whole document, not just the form fields) and is embedded inside the PDF. While the specification itself is open and available, it's not part of the ISO PDF specification. It's also long (1500+ pages) and complex, having gone through 10 revisions since Acrobat 6. XFA was deprecated in 2020 with the release of PDF 2.0.
Why does it exist?
Well, the original forms in PDF are arguably a bit of a flawed design and there are a lot of things that could have been done better, so there was room for improvement. XFA is a dialect of XML, which is a sensible container format, and it separates data from content in much the same way as the W3C XForms specification, which is undeniably a good thing.
So what are the problems with XFA
Personally I have quite a list, but the main one is XFA replaces, not augments, the PDF specification: the PDF file is now just a container, and the entire document is defined in the XFA layer. It undoubtedly warranted a new XFA file format; so by trying to elbow it in via the existing standard of PDF Adobe ensured a generation of confusion and annoyance from third party vendors and their customers.
Which tools support it?
For full support, you need Adobe's own products. Our API has limited support as described below, and we expect other third-party products to have support ranging from none to limited.
How do I create an XFA document?
You need an XFA-aware PDF producer, which is likely to be Adobe LiveCycle. When you save your document it will save it as an XFA PDF, and you'll have two options:
What support do BFO tools have for XFA?
How do I know what sort of PDF I have?
How do I delete the XFA layer and what are the consequences?
How is very simple: with our API, just call:
pdf.getForm().removeXFA();
There are some XFA features that cannot be supported in PDF. For example, if your form allows you to choose date fields from a date picker then deleting the XFA will remove that functionality, and in general anything related to field validation will probably go as well (although with some effort it's probably possible to reimplement this with regular PDF JavaScript).
For documents that are going through a final stage of processing before being sent out, and where the customer isn't expected to modify the form, removing the XFA layer should be fine.