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
- After you build your PDF form document, open it in Adobe Acrobat.
- Fill the fields with sample data.
- Select Tools, and click:
The field names appear in the form, and in a table on the right side of the window.
- From the Prepare Form menu in the upper left corner, select Export PDF:
The Export window appears:
- Select More Formats and select XML:
- 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.
- Delete your sample data values and save the XML as a blank template.
- 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.
- Open the blank PDF form and click:
- On the right side of the screen, select More:
- And select Clear Form:
- Then, select More and select Import Data:
- 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:
||program executable name|
||name of your blank PDF form file, to receive imported records|
||name you want to assign to your saved PDF output file|
||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.