Skip to main content
Participant
April 3, 2018
Answered

similar look documents problem

  • April 3, 2018
  • 1 reply
  • 835 views

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 has been closed for replies.
Correct answer Joel Geraci

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.

1 reply

Joel Geraci
Community Expert
Joel GeraciCommunity ExpertCorrect answer
Community Expert
April 3, 2018

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.

Bernd Alheit
Community Expert
Community Expert
April 4, 2018

This will change the user preference.

Joel Geraci
Community Expert
Community Expert
April 4, 2018

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