How to Convert XFA to PDF

Sometimes you need to flatten a PDF for printing, security, or a number of other reasons. But how do you convert an XFA form to PDF? There’s a few different ways you can do this, depending on what your requirements are.

How to flatten a PDF

1 What is XFA Flattening?

XFA flattening is another way of referring to converting XFA forms to standard PDF. Converting XFA forms to a PDF “flattens” the document data into one layer, making these PDF files uneditable.

2 Why Convert XFA to Flat PDF?

When sending documents to customers and/or colleagues, sometimes you don’t want to send a document with form interactivity still enabled. Flattening XFA forms allow you to provide solely the information that’s relevant, in a way that cannot be altered.

3 How to Convert XFA to Standard PDF?

You can use PDF Forms Flattener to easily turn your XFA documents into PDFs. The demo below works for a simple XFA to PDF conversion, but if you download PDF Forms Flattener (either as a free evaluation or available to buy!) you’ll be able to import XFA form data into blank PDF documents before you flatten. This can be useful if you have form inputs from an HTML form. 

What About Dynamic XFA?

Interactive forms that are able to change form fields based on user input are known as dynamic forms as opposed to static forms. Some tools have trouble converting dynamic XFA to PDF, but PDF Forms Flattener is able to flatten dynamic XFA with no issues.

Input PDF:
Choose File

I have read and agree to the Terms and Conditions

1 Upload File to Demo

Click the button on the demo that says “add file”; choose your XFA document, and upload it to the demo.

2 Run Demo

Agree to the terms and conditions, and then press the “process” button to run the flattener demo.

3 Download Flattened PDF

Once the flattener has finished loading and there are no errors, you should see the option to download your flattened file. This is the simplest way to convert XFA to PDF online.

1 Download Tool

You can purchase or download PDF Forms Flattener; Go through the checkout process as normal until you have downloaded and installed PDF Forms Flattener.

2 Enter Commands

The tool itself used via the command line. To run the program, follow this format;

PDFFormsFlattener –-input XFADocument.pdf –-output Flattened_output.pdf

–input: copy the path to your XFA document

–output: create a path and filename for your flattened PDF

Press enter and your flattened document should appear in the folder you specified.

#! Bonus Step: Import Form Data

If you have an external file containing form data, you can import it into a blank PDF before flattening. Add the file location to the end with the –import flag. 

PDFFormsFlattener –-input XFADocument.pdf –-output Flattened_output.pdf -–import datafile.xdp

#! Bonus Step: Batch Flattening

If flattening is part of your normal document workflow, or if you just need to flatten a large amount of files at once, PDF Forms Flattener can be used in a batch or shell script file to automate the process.

The End

There you have it! After going through the above steps, you should now have a good idea on how to XFA form flatten, why it can be a good idea to convert XFA PDF to standard PDF, and what it means to flatten XFA PDFs.

Try out PDF Forms Flattener today, or if you’re in the market for a more enterprise level solution, try out PDF Forms Extension for the Adobe PDF Library SDK.