Skip to content
BabaPDF
Learn

What an XFA form is, and why it will not fill in your browser

6 min readArticle

An XFA form is a PDF whose fields are written in Adobe's XML Forms Architecture, not as standard PDF form fields. Browsers and phones mostly cannot run it, so you see blank boxes or a "Please wait" page. Download it and fill it in the free desktop Adobe Acrobat Reader.

An XFA form is a PDF whose form is written in Adobe's XML Forms Architecture instead of as standard PDF form fields. Adobe's own desktop apps are the dependable way to run it. Open one almost anywhere else and you get empty pages, missing boxes, or a page that says "Please wait" and never changes. The fix is usually to open it in the free desktop Adobe Acrobat Reader.

What does XFA form mean?

XFA stands for XML Forms Architecture. It was developed by JetForm, which Adobe bought in 2002, and the ISO committee deprecated it in PDF 2.0 in 2017, according to Wikipedia's XFA entry. The form's fields, layout and logic live in XML packets tucked inside the PDF, not in the PDF's normal form table.

That normal table is called AcroForm, and it is what nearly every PDF tool reads. Why filled PDF forms come back blank explains how it hangs off the document. XFA sits next to it as a separate XML description, and there are two kinds:

  • Static XFA keeps a fixed layout. Some static forms also carry an ordinary AcroForm copy of their fields, which other viewers can fall back on. Call that a hybrid.
  • Dynamic XFA builds its pages from the XML when it opens, so a section can grow, shrink or vanish depending on the answers. The pages stored in the file are just a placeholder for viewers that cannot do the building, often a single sheet that reads "Please wait... If this message is not eventually replaced..."
Four bright panels on dark tiles set out in a cross, with a row of plain dark cards stacked behind them and a short bright bar joining them
Two forms in one file: the one most readers see, and an XML one that only some of them can run.

Why can't an XFA form be edited?

Because the editable part is XML, not PDF page content, and almost no PDF software reads that XML. Adobe's help page on the subject says Acrobat Pro, version 2020 and later, "does not support direct editing" of the XFA data. Changing the layout means going back to the program that designed the form.

How can I fill out an XFA form?

Download it, then open it in the desktop Adobe Acrobat Reader, which is free, rather than in a browser tab or a phone's viewer. Wikipedia notes that the viewers built into browsers and mobile systems mostly do not render XFA, and that these forms typically need a recent desktop Reader or Acrobat.

  1. Save the file first

    Download the form instead of opening it in the browser tab. Most browsers open PDFs in their own viewer, which is where the "Please wait" page appears.

  2. Open it in desktop Adobe Acrobat Reader

    Right-click the file, choose Open with, and pick Adobe Acrobat Reader. The real pages should replace the placeholder once it finishes loading.

  3. Fill it and save it in Reader

    Type your answers and save from Reader. Keep that copy as the one you submit; other apps may show it blank.

Those steps follow Adobe and Wikipedia; Adobe Reader is not tested here.

What happens if you open an XFA form on this site?

I built two test forms with a real XFA packet in each, ran them through the actual code behind the tools, and read every result back with pdf.js, a different library from the one that writes the files. Here is what happened.

  • A dynamic XFA form in Fill PDF Forms shows "No fillable form fields found" and calls the PDF flat. That is the wrong diagnosis: the form exists, just in XML the tool cannot read. Nothing on this site can fill it.
  • A hybrid form works. Fill PDF Forms lists its ordinary fields, fills them and saves. In the saved copy pdf.js reports the regular form present and no XFA: the tool cuts the XFA part loose, so your new answers are the only live form left.
  • Cut loose is not deleted. The XFA packets stay in the file's bytes. The test form's XFA data held the name Ada; I typed Grace Hopper; the fields read Grace Hopper, and "Ada" was still sitting in the raw file. It went from 25,132 bytes to about 24,360, barely smaller.
  • Rotate PDF leaves the XFA alone, and pdf.js still finds it afterwards. Merge, Split and the other page-copying tools drop the whole form, XFA included, along with the stale data.

Do not "fix" a dynamic XFA form with Flatten PDF. In Form fields only mode it finds no fields and says the downloaded copy is unchanged, but the copy has lost its link to the XFA part. What is left is the placeholder page, now permanently. Previews here, Annotate PDF and PDF to JPG all show that same placeholder too, because pdf.js has an XFA mode and this site never switches it on.

A dark flat slab with a bright edge, an unplugged bright cable lying loose across it and a small dark cube still sitting at its far corner
Cutting the link is not the same as removing the part. The old XFA packet rides along in the bytes.

That leftover data matters if the form held something private before you filled it. Two steps clear it, both tested on the same file. First run the filled copy through Flatten PDF in Form fields only mode, which writes your answers into the page as ordinary text. Then open the result in Extract Pages and select every page. Extracting copies the pages into a brand new file, so the old packets stay behind: the test file went from about 25,100 bytes to 2,120, "Grace Hopper" was still on the page, and "Ada" was gone. The new file also drops the title and any bookmarks.

Fill PDF FormsComplete and save interactive form fields.

How do I change an XFA to PDF?

An XFA form is already a PDF; what you usually want is a copy that every viewer opens. Fill it in desktop Adobe Reader, then print it to a PDF printer, such as Microsoft Print to PDF on Windows. The printed copy is plain page content with no form at all. That route is widely recommended, not tested here.

For a hybrid form there is a shorter way: fill it in Fill PDF Forms. The saved copy is an ordinary AcroForm that other viewers can open, with the caveat above about the XFA bytes left inside. Then flatten it if the answers should stop being editable.

How can I open an XFA file online?

Online XFA flatteners exist, such as a free demo from iText. They work by uploading your form to a server that has an XFA engine, so the filled-in answers travel with it. Whether that is acceptable is the question in is it safe to upload a PDF online.

This site's tools carry no XFA engine, so for a dynamic form the honest answer is desktop Adobe Reader.

The short version

  • XFA is an Adobe XML form format inside a PDF, deprecated in PDF 2.0. Browsers and phones mostly cannot run it.
  • On this site a dynamic XFA form shows no fields. A hybrid one fills fine, and the saved copy loses its XFA link.
  • The old XFA data stays in the bytes after filling. Flatten form fields, then extract every page, to drop it.
  • Do not flatten a dynamic XFA form in Form fields only mode: you keep the "Please wait" page and lose the form.
Keep reading