Skip to main content
Participant
February 28, 2019
Answered

How can I override or disable Acrobat user settings form highlight colors?

  • February 28, 2019
  • 1 reply
  • 747 views

I put a lot of time in designing an OK looking interactive form. I want all the textfields to be white on a colored background. No problem so far. Now when opening the PDF in the reader it shows all the fields in the colors specified in the user preferences of Acrobat. Can be any color but in my case everything turns purple! Have to uncheck the setting to see everything back to normal. I want my file to look the same to anybody opening it no matter what their personal settings are for forms. Is there a way to uncheck these settings when opening the file by executing an action javascript? Hope someone knows a way, it's been bugging me too long now, not a programmer myself obviously. Thanks.

This topic has been closed for replies.
Correct answer try67

OK. Open your file and to go Tools - JavaScript - Document JavaScripts and add a new item (call it "scripts", for example), with the following code:

if (app.runtimeHighlight && app.alert("The form fields highlighting is enabled. To best view this document it is recommended to turn it off. This will affect other files as well. Do you wish to do so now?",2,2)==4) {

    app.runtimeHighlight = false;

}

Save and close the file and you're done.

1 reply

try67
Community Expert
Community Expert
February 28, 2019

It's possible to do it, but there's a problem. If you change the setting to highlight form fields it will not affect only your file, but all the files the user opens, as it's a setting of the application, not the document.

So if you are going to do it I would recommend at least informing the user of this change, or (better yet) asking them if they agree to it, before actually changing it.

Either way it requires embedding a script in the file.

yumyum36Author
Participant
February 28, 2019

Ok, copy this, but still - how?

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
February 28, 2019

OK. Open your file and to go Tools - JavaScript - Document JavaScripts and add a new item (call it "scripts", for example), with the following code:

if (app.runtimeHighlight && app.alert("The form fields highlighting is enabled. To best view this document it is recommended to turn it off. This will affect other files as well. Do you wish to do so now?",2,2)==4) {

    app.runtimeHighlight = false;

}

Save and close the file and you're done.