PDF Forms Flattener

Importing Data into PDF Forms Documents

PDF Forms documents are easy to build with Adobe Acrobat, and can be useful in collecting survey data and other information from customers, clients, prospects, employees, and constituents.

You can use PDF Forms Flattener to import records into blank PDF forms documents, and run this as an batch workflow. Thus you could automatically generate dozens or hundreds of PDF form documents at a time. You would copy the records you need from your database into a template file, and then import these records from the template file into a blank PDF form or series of PDF form documents. We describe this process below.

Creating an XML template input file

  1. After you build your PDF form document, open it in Adobe Acrobat.

 

  1. Fill the fields with sample data.

 

  1. Select Tools, and click:

The field names appear in the form, and in a table on the right side of the window.

 

  1. From the Prepare Form menu in the upper left corner, select Export PDF:


The Export window appears:

 

  1. Select More Formats and select XML:

 

  1. Click to create an XML output file.

The field names and the data appear in the XML file.  We reformatted this sample XML file to make it easier to read:

Note that all of the fields in your PDF form document appear in this XML file.

 

  1. Delete your sample data values and save the XML as a blank template.
  2. Then, import the records you want to add to your blank PDF form from your database, spreadsheet file (CSV), or other source into this XML template.

Using the XML template file with Adobe Acrobat to import data into a PDF form

In Adobe Acrobat, you would import your data values from this XML template file into the blank PDF form document.

 

  1. Open the blank PDF form and click:

  1. On the right side of the screen, select More:

  1. And select Clear Form:

 

  1. Then, select More and select Import Data:

  1. Select the file to use for importing records into the PDF form document.

That works.  You just filled out the fields in your blank PDF form document with data you imported from your XML template file.

But you can only import data into one blank PDF form document at a time.

You can use the PDF Forms Flattener instead to complete the process programmatically, as part of a workflow.

Using the XML template file with PDF Forms Flattener to import data into a PDF form

After you create your XML template, you could use a command statement like this from PDF Forms Flattener:

PDFFormsFlattener.exe -i InputPDFForm.pdf -o OutputPDFForm.pdf -d InputData.xml

The command statement syntax includes:

PDFFormsFlattener.exe program executable name
-i InputPDFForm.pdf name of your blank PDF form file, to receive imported records
-o OutputPDFForm.pdf name you want to assign to your saved PDF output file
-d InputData.xml  name of your XML template, the source of your input content

So with this PDF Forms Flattener command statement, you could run a batch process to import content into the fields of a blank PDF form document, and generate 100 or 500 copies of this PDF form and find the saved PDF forms documents waiting for you in a server directory when you come to the office the next morning.  You could also use multiple XML template files to complete the fields of a variety of PDF forms documents, or run the same process 250 times with 250 different XML templates, so that each PDF form output document is unique. PDF Forms Flattener will work as well as Adobe Acrobat in generating completed PDF form files, but with PDF Forms Flattener, after you set up the workflow, the process runs on its own, without needing human help, and you can generate as many completed PDF form documents as you need.