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

Batch highlighting in PDF?

tintong
Registered: Aug 21 2008
Posts: 4

Hello there,

I'm trying to highlight the word "page" in my PDF document, which appears over and over again in various places. I'm trying to avoid to manually search for the word and highlight it as the document is quite large.

Is there any way I can do this as a batch process? I'm using Acrobat 7 professional.

Thank you!

My Product Information:
Acrobat Pro 7.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This is something you can write an automation script for. The script could be activated from a toolbar button for one-off document or a batch process.

This is not a trivial script. But the code for most of the parts are already available. There are only 3 functions in Acrobat JavaScript you need to look up, [b]doc.getPageNthWord()[/b] for searching the words on a page, [b]doc.getPageNthWordQuad()[/b] for getting the word's location on the page, and [b]doc.addAnnot()[/b] for placing the highlight annot over the word.

Look these functions up in the Acrobat 8 JavaScript Reference and you'll also find example code for most of what you need.


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

tintong
Registered: Aug 21 2008
Posts: 4
Thanks very much Thom, I'll test it out!