0

I have designed a form with text entry fields in Indesign. When viewed as a PDF in Acrobat the field highlight color is a purplish blue (as shown in the image here). Is there any way to set the field highlight color so that it is a different color than this default purplish blue color? I understand this highlight color can be changed in a setting in Acrobat on the viewer's end, but I want to change it directly in the PDF before the viewer opens it so that it overrides their local setting. This way it would be in keeping with company brand colors. Any way to do that?

enter image description here

1 Answer 1

1

Yes, you can use JavaScript to do so.

2 possibilities:

1- You can change the user's default preference. Meaning that this preference will be set for any PDF user will open.

To do so, open your PDF and add the following JavaScript code in
Javascript > Document Javascripts:

app.runtimeHighlightColor=color=["RGB",1,0.5,0.6];

Of course, change RGB (or CMYK) values as per your client brand color.

2- If you want to change this preference at a document-level only, then you have to store the original Highlight Fields value at first, change it as described in point 1 and then change it back when document is closed.

Javascript > Document Javascripts:

var originalColor = app.runtimeHighlightColor;

app.runtimeHighlightColor=color=["RGB",1,0.5,0.6];

Javascript > Set document actions > At closing:

app.runtimeHighlightColor=color=originalColor ;
2
  • Thanks. Is the JS code something you can add in Indesign or only Acrobat?
    – efrozit
    Feb 4, 2019 at 16:42
  • In Acrobat only
    – Vinny
    Feb 5, 2019 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.