I have an Excel template that has data in several fields already. I also have several pdf files that already have been created. What I am trying to figure out, is how to populate data form this one excel spreadsheet to the pdfs.
Any help that could be provided ....will be greatly appreciated.
Thanks
1. Save the spread sheet to a comma delimited file. This can be imported directly into the PDF forms if the field names in the spread sheet are the same as the field names in the PDF forms. Look in the Acrobat JavaScript API Reference for the "doc.importTextData()" function.
2. If the fields names are different, as I imagine they are, you'll have to do some name mapping.
The simplest, but least effecient, approach is to manually rename the fields in the tab delimited file, or manually rename all the relevant fields on the PDF Forms.
3. Alternatively you can create a folder level Automation JavaScript to do the name mapping for you. This requires a good grip on PDF scripting. It requires creating a name mapping stucture of some type. Since the mapping is done with code you don't need to save the data as a tab delimited file, but it does need to be in some parsable format, like XML. The JS will need to load this file into an attachement in the PDF. Read out and parse the data, then use the name mapping structure to copy values from the parsed data into the form fields.
4. If you are a web programmer guy, then you could write a server script to convert the data into FDF. Same idea as in #3, but done on a local server. The automation script would do a submitData to the server with all the relevant info about the form so the server script can do the data conversion. Then the server returns an FDF with all the proper data in it for the particular form.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script