Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Ok, copy this, but still - how?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Wow, this is so neat. You just made my day. Thanks so much!