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

Highlighting a line of text?

PJF
Registered: May 2 2006
Posts: 11

I have a need to highlight a line of text in acrobat when the user selects the text with the mouse.
 
How can I accoplish this in JavaScript
 
Thanks

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