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

Automation in Acrobat - Marking words in a lot of documents (Javascrip

mrmister
Registered: May 15 2008
Posts: 3

Hi

My problem is I work with around ([b]20,000 PDF documents per folder[/b] / twenty thousand documents per folder - no joke) and I need to review them.

Amazingly... you'd think I will never end, but reading 50 documents per day (which is not a huge quantity of work, then I'll finish my job in 1 year 3 months approximately. That is reading 50 documents from monday to saturday in a full time basis of 8 hours.

Okay. [b]I wished to do more pleasant my job[/b] with that HUGE quantity of information, [b]marking in yellow a list of important words, for example:

urgent
delayed
granted[/b]

Then, my work is easier, because I open the PDF, I browse fast with the mice thru the document, and bingo I see all the important words in yellow.

[b]I've learned Acrobat allows the [u]Batch Processing[/u], so using a [u]Javascript code[/u] I can automate a sequence of tasks.[/b]

[b]What I need is a simple Javascript code for Adobe Acrobat that automate tasks (Batch Processing), and can do the following:[/b]

1. Accomplish a search in the documents stored in a certain folder, let's say [i]c:\documents[/i]

2. Then mark in yellow a list of important words, for example: urgent, delayed, granted

3. Then save the document in a different folder, let's say [i]c:\accomplished[/i]

4. Finally, continue again with the next document until finish the folder [i]c:\documents[/i], marking all the documents inside and saving them marked in the [i]c:\accomplished[/i] folder.

[b]A simple script doing this, could be really helpful for many people which are working with thousands of documents daily[/b].

People which would use this script are: Doctors in hospitals which need to review thousands of medical histories from patients in PDF files looking for treatments of patients which are taking certain drugs... Legal professionals to look important words in legal documents, Researchers to look up for important content inside documents, students allowing them to concentrate in the important information before the exams)

[b]Please, could someone post a simple script doing this?[/b]

I'd be really grateful.

Thanks

My Product Information:
Acrobat Standard 8.1.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
There is already an example of doing something similar to this in the Acrobat JavaScript Reference. Lookup the doc.addLink() fucntion. Example 2 searches the PDF for a certian word and puts a link over it. You just need to change this code to place a highlight annot.

To do this remove the coordinate manipulation, i.e. the matrix2D stuff. Then change "addLink()" with "addAnnot()". And of courese change the input parameters to what's needed to place a highlight annot.

Download the Acrobat JavaScript Reference from here:
http://www.adobe.com/devnet/acrobat/javascript.php

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

mrmister
Registered: May 15 2008
Posts: 3
Matey, if you help me to do this you'll save my life !!!!!!!!!!!!!!!!!!! :D

I have the Javascript reference guide, exactly I have two guides in PDF... which are as follows:

Acrobat JavaScript Scripting Guide
280 pages in PDF (which is an introduction to the languaje)

Acrobat JavaScript Scripting Reference
680 pages in PDF (which is a complete description of every function of the javascript languaje for adobe acrobat)

You say the example is in the last one? in the 680 pages manual?

Can you tell me where it is ??? what page please??

Again, thanks a lot for helping me !!!!!!!!
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Look in the API part of the reference for the doc object. Under the methods of the doc object you'll find the "addLink()" function. You'll need to read some the of Guide, specifically the part on annotations, to get familiar with Acrobat JS before you modify the code.

Good Luck

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