Skip to main content
Participant
April 15, 2020
Question

Interactive PDF - Buttons from InDesign have visible black outline in PDF

  • April 15, 2020
  • 8 replies
  • 5597 views

My InDesign file has a map with buttons on 3 countries (with show/hide actions) —AUS, US, Brazil. When exported to Acrobat, the buttons have a visible black box that shows up where the "box" of the button is. How do I remove that? Any help is appreciated! Thank you!  

This topic has been closed for replies.

8 replies

JR Boulay
Community Expert
Community Expert
September 19, 2022

Sorry for the too terse answer but don't do that, unless you really want it to be a user choice (vs document behavior).

This script must be placed in "Document JavaScripts", name it "init" or whatever you want.

Then the script will run at each document opening (and each click on the "Close" button).

 

Acrobate du PDF, InDesigner et Photoshopographe
Participant
September 19, 2022

No apologies necessary...for all readers, please ignore my post and follow JR Boulay's above. And please forgive my newb-ness. 🙂 

JR Boulay
Community Expert
Community Expert
September 14, 2022

Please read my answer above

Acrobate du PDF, InDesigner et Photoshopographe
Participant
September 18, 2022

Below is a workable solution. Apologies to JR Boulay if this solution was clear in the above answers...it wasn't to me. The key is to apply the javascript code to the actual button. Steps:

 

1. Open pdf

2. Search “tools” and find “Select object”

3. Click select object (this will highlight all your buttons)

4. Right click on the button you'd like to program and select properties

5. Then go to actions tab

6. Select on focus for the trigger

7. Select run javascript for the action

8. Then click add

9. Type app.focusRect = false into the box.. This deactivates the focus rectangle.
   (To active the focus rectangle back use app.focusRect = true)

10. Then click ok.

11. Close and save the pdf.

12. Reopen the pdf and go and click the button you added the javascript to.

13. Now check your pdf preferences, the show focus rectangle should be turned off.

 

I'll try to record a youtube video to show these steps. and add to this post. Thanks all!

 

JR Boulay
Community Expert
Community Expert
September 13, 2022

See Luke Jennings3 answer above.

 

Acrobate du PDF, InDesigner et Photoshopographe
Participant
September 13, 2022

Thanks for the quick reply...but that's my problem. It's going to clients, where I have no control over their preference setup...so if there is a way to have the default setting within the file be "off" that would be ideal 🙂

JR Boulay
Community Expert
Community Expert
July 6, 2022

Please read my answer above

Acrobate du PDF, InDesigner et Photoshopographe
Participant
September 13, 2022

@JR Boulay your line of code worked on my Acrobat file, but others are still seeing the box. Any way to remove that line for other viewers?

Participant
July 5, 2022

Hi @Patti_NJ  have you managed to solve this issue?

 

I am experiencing the exact same issue: when exporting my Indesign document as interactive PDF, it works perfectly in Preview (Mac), but when opened in Acrobat I get those same visible black dotted outlines/bounding box borders on my file. I need these borders to not be visible when random reader/viewers open the PDF on their computers (as I have no idea what pdf viewer they have installed, or if they have Mac (Preview) or Windows/Acrobat etc).

 

Any help would be much appreciated! I am using Indesign 2022, and Acrobat Pro DC 2022 version.

 

Screenshot:

 

JR Boulay
Community Expert
Community Expert
September 16, 2021

Use this JavaScript as a "Document level" script, so it will run at document opening:

app.focusRect = false;

Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
September 16, 2021

Just be aware it will affect all other files you open, not just the ones you create in InDesign...

amandar62683160
Participant
August 28, 2022

First ID PDF and these borders are obnoxious. I don't see anything on line about adding a "Document level" script. Where do I put this code please? Thanks!

try67
Community Expert
Community Expert
April 15, 2020

I don't see any such box. Can you send a screenshot of what you're seeing?

Also, what version of Acrobat are you using?

try67
Community Expert
Community Expert
April 15, 2020

PS. The show/hide actions you associated with the fields are very clumsy and barely working. I suggest you use a script to do it.

Luke Jennings3
Community Expert
Community Expert
April 15, 2020

In Acrobat & Reader you can go to Preferences> Forms> Show focus rectangle (un-check), this will turn off the box for you, but not other people who view the PDF. I don't know if there is a work-around for this, although I believe buttons set to mouse enter and mouse exit do not create a black box (no clicking).

Patti_NJAuthor
Participant
April 16, 2020

Thank you, that worked for me but I woud need the viewers to see no box too. I'll try no click as an option as well.