Skip to main content
Kathy5FFA
Inspiring
July 21, 2025
Question

Add a Script to InDesign that Runs Upon Opening Exported PDF in Acrobat

  • July 21, 2025
  • 1 reply
  • 268 views

Hello,
I create a number of InDesign files that include interactive text fields and checkboxes. After exporting them, I always add the JavaScript 
app.runtimeHighlight = false;
to the pdf file in Acrobat to make sure that the blue highlights do not appear on the buttons. I do this very often and it can become a pain to keep adding it back into the pdf after each round of edits and export. Is there a way to add this script into the InDesign file so that it will run upon opening the pdf in Acrobat every time I export it so that I don't have to do it manually each time?

I know how to add a script to InDesign, but I don't know how to get it to run automatically on the opening of the pdf in Acrobat. Only if you click a button.
Thank you.

1 reply

brian_p_dts
Community Expert
Community Expert
July 21, 2025

Might be better asked in the Acrobat scripting forum, but I imagine you could set up a startup script event listener in Acrobat to run your script when a new doc opens there. InDesign has event listeners, and I imagine Acrobat does too but I am unfamiliar with that environment. 

Kathy5FFA
Kathy5FFAAuthor
Inspiring
July 21, 2025

Running it when it opens in my Acrobat won't help because these pdfs are going to be used my many other people who will not have that script in their Acrobat. So it needs to be embedded it the file before it opens. I can look into event listeners in InDesign. Thank you.

brian_p_dts
Community Expert
Community Expert
July 21, 2025

It's not going to do any good in InDesign, as that property is only for Acrobat. You would need some way to deploy that Acrobat script to your various Acrobat users.