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

Batch File Processing and Writing

MartinPerry
Registered: Oct 17 2007
Posts: 8

I am attempting to write a batch file. I want the batch to look at a 5000 page document and specifically look at lines 4 and 5 of each individual page. I then want it to automatically insert bookmarks based on the information read. Also, it needs to omit any and all duplicates. Can this be done?

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Since you are operating on a single PDF you don't need a batch sequence. What you need is a folder level automation script. But with a good knowledge of Acrobat JavaScript you can do this.

First, Text in a PDF is not organized in lines. Each piece of text is place with X and Y coordinates. But you can estimate the location of the lines you want to examine and then search for the text in the lines based on location. You'll these two Acrobat JavaScript functions:

doc.getPageNthWord() and doc.getPageNthWordQuad()

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script