These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

ISO Help with xfering data to pdf metadata

mtpaper
Registered: Sep 18 2008
Posts: 9

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

My Product Information:
Acrobat Pro 9.0
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This issue definately requires a JavaScript solution. However, it's a tricky automation scripting solution. I'll outline a strategy, but if you are not a programmer you will need to hire one.

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

mtpaper
Registered: Sep 18 2008
Posts: 9
Hi Thom -

I'll take a look at all this tonight, but I have to say, THANK YOU for reassuring me that it is, indeed, complicated.

I'll hunt around to see who I know who knows javascript

Thanks
Marion
mtpaper
Registered: Sep 18 2008
Posts: 9
UPDATE ->This is VERY easy to do using the free download (on the windows platform) called:
BeCyMetaEdit.com

It is also possible to make the transfer using ExifTool, another free download and superb application that works on pc and mac. I don't know how to do it with ExifTool yet, but I know it's possible.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Excellent!! If you look hard enough you can often find a 3rd party tool for most common tasks.

Thanks for posting the info

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