Showing and Hiding Objects in Interactive PDF
In my recent postings on creating buttons in interactive PDF, I gave some tips on creating buttons. A question on the Adobe InDesign Forum reminded me of another.
I have been tasked to produce a product that will consist of a interactive map of sorts in a PDF format. The map will consist of about 80 locations (marked with a small circle and the city name) with contact information for particular individuals. My plan was to have a mouseover/hover text pop up containing the contact information when the mouse is over the circle/city name. If anyone could help me figure this out it would save me an immense amount of time.
This is pretty easy to do in InDesign, but the method isn’t obvious. It requires creating two separate buttons—one for the object to be shown and hidden, and one for the button which triggers the show/hide effect.
I’ll first illustrate this in InDesign CS4, which has a more elegant interface for creating buttons:
1. Turn the object to be shown/hidden into a button using the Buttons panel. (I chose an image of a balloon festival and chose Object > Interactive > Convert to Button.) This button should have no action, but choose Hidden in PDF as a property from the panel menu.
2. Create the trigger button. (I selected one of the buttons from InDesign CS4′s Sample Buttons library, and added some text.) For the Event called On Roll Over, click the + button beside Actions to add an action. Choose the Show/Hide Buttons action. Set the visibility of the show/hide button (the balloons) by choosing the eyeball icon to indicate that it’s visible on roll over.
3. For the same button, choose the Off Roll Over event. Again, choose the Show/Hide Buttons action. Set the visibility of the show/hide button (the balloons) to the eyeball with the slash symbol (meaning hidden).
Export the PDF (remembering to turn on the Interactive Elements checkbox on the Export PDF dialog). Mousing over the trigger button shows the hidden button. Mousing off it hides it.
Working in InDesign CS, CS2 or CS3 works essentially the same. For details, refer to InDesign Help. In brief, you’ll create the same two buttons, and use the States panel to set the same properties. Here are what the choices in the dialog look like in InDesign CS3:
InDesignSecrets






Thank you so much for this tutorial, I’ve been working on this for a day now. This is exactly what I need!! Will let you know if it works for me!
I’m experiencing a problem with the roll over. The info box appears when you roll over the space that that exact box takes up, even though it’s not visible, instead of when you roll over the “info” icon only. This means that the box obstructs most of the page your mouse in in the general vicinity of the box.
Can you help?
@Cathy: Yes, the frame itself is the button, not the picture. Even more frustrating, Acrobat cannot do non-rectangular buttons.
I want a caption to appear when they roll over a photo and then to disappear when they roll off. I cannot seem to make it work.
@keith: The instructions in Steve’s blog post above should give you all the details you need. If you still can’t get it to work, you might consider heading over to the Forum (click Forum above) and describing what you’ve tried there, so more people can help diagnose the problem.
Will the text be able to be read by a screen reader to comply with ADA requirements?
@Vicki: I’m not sure what you’re asking about. For information about accesibility issues, I suggest looking at these articles: http://indesignsecrets.com/tag/accessible
Can this be done when you hover over a word within a text box. Obviously, you could just create an invisible button over a particular word but that wouldn’t work if the text was subsequently edited and the word moved.
So is it possible to use this to create a pop-up message when you hover over certain words within text?
can you do this in Adobe?
Can you update this to CS6? I dont have CS4 and some of the commands are a bit different. or missing.
Trying to do this on CS6, the only difference, in terms of interface, is that the ‘hide object in PDF’ button has changed to a check box in the same window.
I am not managing to get this to work, I have some questions:
Are there two separate buttons (labeled show me) ?
Does the Ballon image need to be set to ‘on roll off’ (i see it your the image, but not on the instructions)?
UPDATE: This works when I export it in SWF, but not in interactive PDF :(
@Highgeared: Here’s the CS6 panel:

As @Stewart said, the interface is pretty similar.
@Rob: You can, but you need to convert the word to outlines (select the word, then choose Type > Convert to Outlines) so it becomes an object. That’s what I’ve done in the image above.
@Stewart: No there is only one button. The actions are different for roll on and roll off. The balloon image has no actions, I think; it’s a “button” only because it needs to be in order to be controlled by the button. Not sure why it would work in SWF but not PDF for you; be sure you’re exporting to Interactive PDF (not Print PDF).
Can anyone help please…..
I’m currently working on a project, everything works fine when I export it as interactive pdf. However, I want certain buttons to reamin the same size when you zoom in in Adobe Reader. I didn’t realize that until I starated working on this project which is way different to others and in order to review it after is done I need to zoom in to a certain area due to the many buttons thatI have and the button that is supposed to hide/show is not visible anymore.
Help please….
Thanks in advance.
I love you. Found this tutorial quite fast when I was browsing the web and it was really what I needed. Simple and powerful tools those buttons!
It’s a teeny bit different in InDesign CS5 now though. But it works pretty much the same way and when you’re clicking through the options in the buttons toolbar you see that the possibilities are endless.
Thank you!
Using InDesign CS6, this doesn’t seem to work as an interactive design.
I created an interactive PDF with InDesignCS5.5 but all the buttons are not showing on mobile devices. Is there anyway they can show up and work!?
@mrdusnob: See this article: http://indesignsecrets.com/navigation-button-tricks-for-interactive-pdf-on-an-ipad.php
Same problem here ( InDesign CS6) it works well when exported as SWF, but doesn’t work when exported as interactive PDF. Also I have applied rollover effect on the buttons (a stroke) -so in PDF it appears for a second and then disappears again.
Hello. I’m trying to have a rollover button so a box pops up with more text and a link inside. I also want the pop up box to disappear when I roll off. This bit is done but the problem is the pop up box disappears when you move towards the link. Any idea anyone
Thanks
HI All,
I think I’m overlooking something. May I ask for your help?
Have buttons that successfully hide, but the hyperlinks remain….? Can we kide the links also?
Detail:
have a successful “interactive PDF” that has buttons to [show/hide a layer] of content (had to do that from Acrobat). At the same time, I’m having these buttons [show/hide buttons] that are on the page.
These buttons have hyperlinks set from InDesign.
The [Show/hide buttons] is successful, but:
the silly hyperlinks remain thus they remian while the top layer is toggled on and disrupt the content.
Any clues on how to hide the buttons *& the links?
Thanks much~
PS: My buttons to hide are transparent frames with a transparent rollover color.
HI All,
-Found a workaround.
I’m already doing [Set layer state] in Acrobat, so I just put the buttons to hide on a new layer and add that to the action. duh~