Hello -
I am not a programmer. I am 99.9% sure that I need to use Thom Parker's script tutorial to accomplish a task, but I do not know Javascript (altho I did manage to find out how to access it)
I am using Acrobat Pro 9 on my mac (altho I also have access to Acrobat on a windows based computer if that helps).
I have a tab-delimited text file (can also be excel if that helps) with 1000s of records
I have 1000s of pdfs. The name of each pdf is the first field in each record of the text file
I want a script that will read each line of the text file, and stuff the info into the pdf's metadata.
I don't know how or where to begin, and, as I know zilch, Thom's tutorial (while excellently written) intimidates me.
Is there anyone out there who can walk me thru this a bit?
Thanks in advance
Marion
First, Acrobat can read a line from a tab delimited file into the form fields of a PDF. So the first step is to make a PDF whose form field names match the column names in the tab delimited file. And make sure that this code, when run from the console window, will import any line from the data file:
this.importTextData(cPath, nLine);
you'll need to fill in the "cPath" and "nLine" parameters.
This gets the data into Acrobat in a form that it can use to transfer the data into the metadata.
Next you need code to read the data out of the form fields, load the specified file, set the metadata, and then save and close the file.
This solution could also be driven from AppleScript, or on the PC side with a VB program or by using the ADBC object in JavaScript. The solution presented here is the simplest and most direct, not necessarily the fastest or most efficient.
None of these things are difficult tasks for an experienced Acrobat JavaScript programmer, but they are not trivial and beyond the scope of this forum.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script