• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Fields highlight color

Community Beginner ,
Dec 26, 2019 Dec 26, 2019

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.

 

 

TOPICS
Create PDFs , General troubleshooting , PDF forms

Views

4.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Dec 27, 2019 Dec 27, 2019

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

...

Votes

Translate

Translate
Community Expert , Dec 27, 2019 Dec 27, 2019

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;

Votes

Translate

Translate
Community Expert ,
Dec 27, 2019 Dec 27, 2019

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 27, 2019 Dec 27, 2019

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2019 Dec 27, 2019

Copy link to clipboard

Copied

It WILL affect ALL other files opened on that machine! I strongly recommend you don't do that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 27, 2019 Dec 27, 2019

Copy link to clipboard

Copied

I tried, I know what is the problem now.

Thanks for the information!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2019 Dec 27, 2019

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;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 27, 2019 Dec 27, 2019

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2019 Dec 27, 2019

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 27, 2019 Dec 27, 2019

Copy link to clipboard

Copied

I think it is a bug hahahaha~

Thanks for the solution guys. this solution is better than nothing. 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2019 Dec 27, 2019

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2019 Dec 27, 2019

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…

😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2019 Dec 27, 2019

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2019 Dec 28, 2019

Copy link to clipboard

Copied

LATEST

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.

 

😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines