0

I made this PDF form button with three different states (and images) for normal, mouseover and pressed, and all works as expected.

However, there still appears this dotted rectangle around the button as soon as the button gets focus (e.g. by pressing it, or by just hitting the Tab key on the keyboard):

https://i.imgur.com/yU8PPfA.png

How can I prevent or hide that focus rectangle in my PDF file?

Is it somehow possible to auto-execute a "focusRect/hide" JavaScript command on opening the document, such that all focus rectangles are hidden? Acrobat JavaScript Scripting Reference Acrobat JavaScript Scripting Reference

Adobe Acrobat Settings

0

1 Answer 1

1

The easiest is to create a little document-level script, just with the command to disable the focusRect.

HOWEVER, by doing that, you change your user's settings, which is not nice behavior.

So, you would first read out the current state, and write it into a variable, and then enable it.

In a Document willClose script, you set it back to what you have saved on opening.

1
  • 1
    Thanks! Actually I had already I managed to switch the focus rectangle off via document-level script (that was dead-easy). However, the nicer approach you describe goes way over my abilities. Do you maybe have a link that shows how to do this?
    – David.P
    Nov 11, 2021 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.