Copy link to clipboard
Copied
Hi guys,
I made a form. I changed the fields highlight color to what I want - brown color using this path Tools > Preferences > Forms > Fields highlight color > Brown > OK.
However, it switched back to default color - purple color if I use another laptop to open the form.
Is that any way to make the fields highlight color to be brown even if I switch device to open it?
Javascript or any field i can use to make this happen?
Thank you.
This color is a property of the application, not the file. You should set the fill color of your fields directly instead of relying on it. However, the highlight color overrides the fill color you select (if enabled), so you should inform your users that they should disable it for the best viewing experience.
A script can be used to detect if the fields highlighting is enabled, and then display a warning message. It can even disable it (or change the highlight color), but I would not recommend y
...Try these scripts.
Place this one as a document level script:
// stores user's preferences
var hiliUserPrefs = app.runtimeHighlight;
var colorUserPrefs = app.runtimeHighlightColor;
// changes application highlight color
app.runtimeHighlight = true;
app.runtimeHighlightColor = ["RGB", 0.96, 0.96, 0.96]; // grey color
Place this one as a "Document will close" action:
// reverts to user's preferences
app.runtimeHighlight = hiliUserPrefs;
app.runtimeHighlightColor = colorUserPrefs;
Copy link to clipboard
Copied
This color is a property of the application, not the file. You should set the fill color of your fields directly instead of relying on it. However, the highlight color overrides the fill color you select (if enabled), so you should inform your users that they should disable it for the best viewing experience.
A script can be used to detect if the fields highlighting is enabled, and then display a warning message. It can even disable it (or change the highlight color), but I would not recommend you do that as it will affect all other files as well and the users might not be too happy about that...
Copy link to clipboard
Copied
I found a solution to let even if i open this pdf in other laptop, it will appear with the color i want.
This is the script i put in Document level JavaScripts to make this happen.
app.runtimeHighlight = true;
app.runtimeHighlightColor= ["RGB", 0.96, 0.96, 0.96]; \\ grey color
By right it will not affect other files right? as it is script for this particular file only.
I have no other file to test on this now.
Copy link to clipboard
Copied
It WILL affect ALL other files opened on that machine! I strongly recommend you don't do that.
Copy link to clipboard
Copied
I tried, I know what is the problem now.
Thanks for the information!
Copy link to clipboard
Copied
Try these scripts.
Place this one as a document level script:
// stores user's preferences
var hiliUserPrefs = app.runtimeHighlight;
var colorUserPrefs = app.runtimeHighlightColor;
// changes application highlight color
app.runtimeHighlight = true;
app.runtimeHighlightColor = ["RGB", 0.96, 0.96, 0.96]; // grey color
Place this one as a "Document will close" action:
// reverts to user's preferences
app.runtimeHighlight = hiliUserPrefs;
app.runtimeHighlightColor = colorUserPrefs;
Copy link to clipboard
Copied
With this script, only the file that I want the fields will be in grey?
It will affect ALL other files opened on that machine?
Copy link to clipboard
Copied
That's a partial solution only. It will still affect all other files opened while the first one is still open...
Copy link to clipboard
Copied
I think it is a bug hahahaha~
Thanks for the solution guys. this solution is better than nothing. 🙂
Copy link to clipboard
Copied
It's not a bug, it's the intended behavior, although not a very well thought-out one, if you ask me.
I think this should have been a property of the Document object, not the App.
Copy link to clipboard
Copied
In most of my forms I just use:
app.runtimeHighlight = true;
app.runtimeHighlightColor = ["RGB", 204/255, 214/255, 255/255]; // light blue
And I never received any complaints or comments…
😉
Copy link to clipboard
Copied
But if you change that color to something people don't expect to see, you might. Also, many users might not realize that it's your file that's making this change. They could just assume it's a bug in the application... I think you should at least notify the user of making this adjustment to the app settings, or better yet, ask for their permission before doing so.
Copy link to clipboard
Copied
You are obviously right, but as an apology, I must clarify that:
- above script just revert to default Acrobat settings (highlight on with a light blue color),
- these forms are intended for use in corporate environments, where all forms share the same settings and all computers share the same presets.
😉