Importing Tab Delimited Data to Populate and Create Individual Forms for Each Row of Data

Didn't see a query quite like this on the board. I have a spreadsheet with data that I need to use to populate multiple iterations of a PDF form: i.e. one unique form for each row of data. So 50 rows of data (not including column headings), and I am creating 50 filled out forms.

So the operation would be to import the field data from row 2, save form, import field data from row 3, save form, etc. through the last row.

The functionality in Acrobat 9 allows me to import a single row of data from a tab-delimited file, but then I have to back out and start over to import the second row of data into the next form. Of course it is doable, but is a highly manual operation.

Can anyone help with a more automated solution.

Regards.


Jonathan Heller


3 Answers

Why yes, you can do this. What you are asking about is called a varible data operation. And it is a very common thing to do. This functionality is not a built-in feature of Acrobat, rather, it's something associated with large scale 3rd party applications. You can even buy special printers that do variable data printing.

But there is a fairly simple way to script this operation in Acrobat.

Check out this article:
http://acrobatusers.com/tutorials/getting-external-data-into-acrobat-x-javascri
pt


I've also written about and have tools and examples for Excel and variable data on my membership site:
http://www.pdfscripting.com/public/department48.cfm

I have scripts here that do direct imports using the "doc.importTextData()" function. Which is less generic than the technique shown in the first article, but is specifially designed to work with Tab delimited files.

This function is actually pretty easy to use, but you have to know the path to the data file up front. The technique is to loop over calling this fucntion until it returns an error code. Of coure the code has to save the file to a new name on each itteration.

I've done many projects using this technique, including one that also automaticall emailed the PDFs.

Thom Parker
The source for PDF Scripting Info pdfscripting.com
All About PDF Stamps in Acrobat and Paperless Workflows - THE BOOK !!

The Acrobat JavaScript Reference, Use it Early and Often

The most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)

Having trouble, Why Doesn't my Script Work


Thom Parker   

This type of action is also known as a Mail Merge. I've developed a script that allows you to easily do it in Acrobat. Have a look here for more info: Acrobat -- Mail Merge and Email

-------------------------------------
Visit my custom-made PDF scripts website: http://try67.blogspot.com
Contact me personally: try6767@gmail.com


Gilad D (try67)   

Thank you both. Will do some digging in the materials you both referenced. I did have that d'oh moment when you referenced this as a mail merge. The mechanics are the same. Cheers.


Jonathan Heller   


Please specify a reason: