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.

Balloon button

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.

Show Me Roll Over State

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).

Show Me Roll Off State

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.

PDF result

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:

CS3 balloons

Related Articles
Comments

29 Comments on “Showing and Hiding Objects in Interactive PDF

  1. 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!

  2. 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?

    • I have created an interactive pdf from CS5.5 that used the hidden pop ups with a trigger button…worked great. Now I’m using the CC version and have created these buttons the same way as previously done but now the button will pop up when I roll over the trigger but it will not hide? I have a file that has to go LIVE today and am so freaked. Can anyone help?

  3. 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.

  4. @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.

  5. 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?

  6. 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)?

  7. @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).

  8. 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.

  9. 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!

  10. 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!?

  11. 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.

  12. 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

  13. 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~

  14. 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~

  15. Hi. I’m trying to make a form that appears upon clicking on a button. I believe the form needs to be a button and a form to make it appear and disappear but so far I have NO idea how to make it both. Any suggestions?

    Thanks much.

  16. Hi. I wanted to give more details on the post I placed above. I am able to make the form appear (leaving it as a form, not a button) through making a different option into a button. BUT as soon as I set that same button to make the object hide the whole button loses its function (no longer makes the form appear or disappear).

    I tried adding a second button on the form to make it hide after filling out and it worked before filling in the form but not after.

    I’d appreciate any ideas.

    thanks

  17. OK. sorry for multiple posts. I think I got it. I was trying to assign the same command to multiple functions (click on, click off) but when I changed it to roll over and click off I was able to get it to work.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>