is now part of CreativePro.com!

Hiding Sound Files in an Interactive PDF

16

There are a few tricky things that can arise when you’re creating interactive PDF files. Here’s a query on the Adobe InDesign Forum:

I want to make a button to play back and stop an mp3 file in an exported pdf. I was able to make a button, then assign two actions to it, one to play the mp3 on mouse click, and the other to stop the mp3 on mouseover. the button looks fine in the pdf, there’s just one problem. Indesign automatically puts a playback toolbar in the exported pdf where the mp3 file is located; even if i choose ‘none’ for poster, the playback bar appears (it’s tiny and unusable); i thought it would be simple to have a button start and stop an mp3 but this is proving tedious. Any simple solution would be appreciated. I simply want to play/stop an mp3 file with one button in an exported pdf.

In InDesign CS5 or 5.5, there are some great controls for controlling media which you place into interactive PDF or SWF files but they may not work seamlessly without doing a little tweaking. This is an example which is not caused by InDesign but by the way Acrobat or Reader display sound files. (If you’re using an earlier version of InDesign, the same issue can happen: See James Fritz’s posting comparing the different media types used in CS5/5.5 with those used by earlier versions of InDesign.)

By default, you have three options for poster images in the Media panel?no poster, a Standard poster (shown) and choosing an image. If you wanted to hide the sound, you might think you could choose a white-colored poster image.

Sound Poster Options

Sound Poster Options

Alternatively, you could check Play on Page Load. This option can have its uses but you lose the ability to stop the sound so it should be with discretion for short sound clips. (Note the additional choice above for Stop on Page Turn.)

What the user above, “Martin S…”, wanted to do was create his own buttons to play and stop a placed MP3 file. When you click the play button an ugly little gray patch appears where the sound file is located on the page regardless of which preview image you choose:

Gray Patch Controller

Gray Patch Controller

If you zoom in, you can see that Acrobat/Reader is trying to “help” you by providing a tiny little controller (enlarged below):

Tiny Controller

Tiny Controller

But it’s ugly and really too small to be useful so how to do hide it? One thought would be to put it on the pasteboard in InDesign but when InDesign creates a PDF file, it clips it to the page size so anything on the pasteboard will not be included.

What if you hid it behind another page object? That doesn’t work because all interactivity object (buttons, media, etc.) are always placed on top of the page layout in a PDF file.

There are two workarounds, one which Martin found himself: Place the sound file behind one of the buttons (like the Play Music button illustrated below). If you make it just smaller than the button, however, it will still appear when you’re scrolling around the PDF page with the sound file with the Hand tool.

Sound Appears on Drag

Sound Appears on Drag

So when you place the sound file behind the button, scale it as small as possible in InDesign, only a couple pixels wide. Then when you scroll the PDF page, it will be essentially invisible. The advantage of this method is that you can do the work in InDesign.

The second workaround is to make a small edit in Acrobat Pro. If you right click on a sound or video file in the PDF file, you’ll get a contextual menu for controlling the media:

Media Contextual Menu

Media Contextual Menu

Choose Properties. For a sound file, this brings up the Edit Sound dialog. In the Playback Style menu, choose Play content in floating window. Then select the width and height to be 1 pixel by 1 pixel, and click OK.

Edit Sound in Acrobat

Edit Sound in Acrobat

When the sound is played with a button, it appears as a tiny black dot which appears at the right side of the screen in the gray background outside the PDF file, again essentially invisible.

Steve Werner is a trainer, consultant, and co-author (with David Blatner and Christopher Smith) of InDesign for QuarkXPress Users and Moving to InDesign. He has worked in the graphic arts industry for more than 20 years and was the training manager for ten years at Rapid Lasergraphics. He has taught computer graphics classes since 1988.
  • Suzanne Brown says:

    You can not believe how well timed it was for the InDesigns Secrets Newsletter to arrive in my inbox with this tip. I was just asked yesterday by my associate creative director with placing movie and sound into a PDF for an important client presentation today.

    No problem. Found the info in the InDesign help section, there should be no issues.
    I would have been so befuddled about the “gray box” had I not opened the newsletter the minute my email loaded this morning (which isn’t necessarily a common thing) and saw the first blog tip.

    It was exactly what I needed to make sure we had a smooth, and polished presentation.

    Thank you for such a great tip.

  • Melinda Hull says:

    This tip was also extremely well-timed and invaluable to me as well. I was able to hide the player in the PDF with no problem, but when I printed out the page, the player was in full view.

    The properties panel does not seem to have a setting for non-printing options. Does anyone have a suggestion or workaround for this problem?

  • Steve Werner says:

    It’s a limitation in InDesign. Buttons can be set to be non-printing in PDF Options on the Buttons panel. But there is no setting for non-printing media.

    However, if you’re creating a PDF for print in InDesign CS5 or 5.5, I’d suggest creating PDF files using Export PDF (Print) which will not include interactive elements.

    In InDesign CS4 or earlier, uncheck Interactive in the Export PDF dialog.

  • Melinda Hull says:

    Thanks so much for the response. My problem is that I am creating an interactive eBook that users will probably want to print off copies for themselves. So I want the file to be inactive and printable.

    So I guess it is up to me to pick up the torch, carry on the good fight and see if I can come up with a workaround.

    Cheers,

    Melinda

  • Erika says:

    Im trying to make an ebook with audio files included and i get the gray box but i dont get the properties option to make it tiny… Im need a player with the slider which is not blocking the text underneath.

    Im using Indesign 5
    Any tip would be great
    thanks

  • Greg Nelson says:

    Hi.

    I have a similar question about making a video hidden. I would like to make the video hidden at startup and when the user clicks on a button (selecting one particular video) then the object is shown and played from the start.

    I can’t seem to find anything around that solves this.

    thanks in advance!

    -greg

  • Kayo says:

    You just saved my life, sir! =D

  • George Tarr says:

    Good tip.

    However, my goal is to provide the enduser an opportunity to listen to multiple tracks multiple times.

    Ideally, I want 30 tracks per page.

    Using the floating window option creates a situation wherein the players are overlapped as each successive track is used.

    And the fixed window option requires excessive page page real estate.

    Any ideas?

    Many thanks.

  • I am so very grateful for this important tip. I would never have found out on my own. Thank you InDesign Secrets!

  • David Blatner says:

    Acrobat XI apparently can’t truly hide these anymore… 1-by-1-pixel get a big ugly border around them, and if I try to hide the audio file, it shows through the other button a little bit (unless that button is solid black). There just doesn’t seem to be any good way to have a background soundtrack in PDFs anymore.

  • Daniel says:

    Thank you so much:

    in my case there is still a problem – I want the STOP button to be on another page. I can’t relate that STOP button to the song that is placed a few pages earlier (below my PLAY button).

    Could you provide some help here?

  • robert says:

    in cc this doesn’t work anymore.
    :(
    is there an other workaround?

  • Here’s another workaround I came to when I was trying the same thing, I placed my audio file on the dashboard right on the edge of page so it is completely in the dashboard and tangent to the paper, now if I left it like this it won’t work cause the button will not read it, it will simply be considered outside of the page, but what I did is that I selected the audio file and I moved it slightly towards the paper so that way the file is completely outside of the paper but just a small tiny pixel strip is on the page, so that way it reads that the file is on the page and it works just fine, and the audio file won’t be visible at all.

  • Luvuyo Booi says:

    Hi everyone! My embedded audio file would not only come with the ugly grey block, but won’t play in my client’s Acrobat Reader either, or in Acrobat on my iPad? Help anyone.

  • Praditha says:

    Hello,

    I have a question about a placing an audio file to an Indesign file. I have a button which have a speaker icon on it. I put a sound action on this button and add the sound clip to it. After I exported the PDF and when I click on the speaker button, Acrobat appear a audio player with a gray background box. Still my sound is not playing. After I click on that audio player play button, then only my audio is playing. Is there any way to play the sound when I click on my icon except the player play button? Please kindly help me on this.

    Thanks
    Praditha

  • >
    Notice: We use cookies on our websites to give you a great online experience. If you keep browsing, we'll assume you're ok with this. For more information, see our privacy policy. By closing this banner, you agree to the use of cookies.I AGREENo