Skip to main content
Participant
Apr 3, 2018 12:11 PM UTC
Answered

similar look documents problem

Hello everyone , I'm new with JS in PDF. I try to find answer for my question, byt cant find it anyware. I create 3D inteactive document based on forms and buttons and it works but dont look everywhere the same. For example: sometimes PDF Reader have different Edit>Preferences>Forms> Hightlight Color. I try to write small script to change this Preference to have the same value. Any body open document have the same setupPreferences like : .

It is possible? Thanks for answer.

This topic is closed to new replies. Start a new post to keep the conversation going.
Joel Geraci
Joel GeraciCorrect answer
Community Expert
Apr 3, 2018 11:53 PM UTC

You can turn off field highlighting with the following. Setting it to true will turn it back on.

app.runtimeHighlight = false

You can control the highlight color using the following. See the Color Object to change what color gets used.

app.runtimeHighlightColor = color.red;

This doesn't change the user preference, it just sets the properties for that document.

8 replies

Joel Geraci
Community Expert
Joel GeraciCommunity ExpertCorrect answer
Community Expert
Apr 3, 2018 11:53 PM UTC

You can turn off field highlighting with the following. Setting it to true will turn it back on.

app.runtimeHighlight = false

You can control the highlight color using the following. See the Color Object to change what color gets used.

app.runtimeHighlightColor = color.red;

This doesn't change the user preference, it just sets the properties for that document.

Translate
Bernd Alheit
Community Expert
Community Expert
Apr 4, 2018 5:04 AM UTC

This will change the user preference.

Translate
Joel Geraci
Community Expert
Community Expert
Apr 4, 2018 3:26 PM UTC

Oh wow. You'r right. There was a time when it doesn't. The fact that it does has got to be a bug.

Translate