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

Highlighting text line with JavaScript

PJF
Registered: May 2 2006
Posts: 11

I have a need to highlight a line of text when the user clicks on it with the mouse.
 
How is this accomplished with JavaScript in Acrobat

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Create both a highlight annotation and a button over the text. The button should be completely clear. No text, border, or fill. Then use JavaScript from the console window to get the name of the highlight annot. Once you have the name, you can use JavaScript in the button action to turn the highlight on and off.

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