Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Bringing Animation from InDesign CS5 into a PDF… with the help of a little script

Recently during the InDesign Secrets Print and ePublishing Conference, there was a fun event called Ignite InDesign where attendees to the conference (including a few of the speakers) gave 5 minute presentations with a slide automatically progressing every 15 seconds. Auto-advancing slides can be quite entertaining for the crowd when the presenter loses track of time and forgets which slide they are on. To create these presentations you could use PowerPoint or Keynote, but this is InDesign Secrets that we are talking about here and we want to use our favorite program.

CS5 has a lot of interactive tools are a lot of fun to use (as seen in Mike’s earlier post), and I wanted to use them in my presentation. My presentation was called “My Favorite Podcasts” and each slide mentioned the name of a Podcast, the album art and a few bullet points about the show. Rather that have normal static presentation, I used the new interactive tools to really have fun with the presentation. After experimenting I was able to successfully export it to SWF, but there was a problem. A SWF will not auto-flip (per the rules of the presentation) without some ActionScript code in Flash Professional and I don’t want to learn ActionScript.


Click the image above to watch the SWF

Using a PDF

A simpler solution was to export to PDF and just run the presentation full screen in Acrobat Pro/Reader. As simple as an approach like this might seem, it didn’t work like I thought. When you export your working InDesign file to a PDF the animations to not work. You are stuck with whatever is static on screen and the results are not very desirable.

The Manual Solution

In order to get the SWFs to play in your PDF you have to export each individual page out as a single SWF and then place it back into InDesign. I highly recommend that you place them on their own SWF layer. After the SWF’s are placed back in the layout you just have to turn the original design layers off and keep the SWF layer on. Now you can export your presentation to PDF and view the animations. If you need to make any changes to the presentation just turn your design layer back on, make your edits and export a new SWF of that page and replace the existing SWF. Your links panel will list a modified link, just update the link and export a new PDF.

Note: Placed SWF’s will not scale inside the PDF therefore it is important to design your layout at the final output size for your presentation.

Scripting to the Rescue!

Exporting each page of a 20 page presentation one at a time to a SWF and then manually placing each SWF back into the layout on its own layer is not fun. I did it for 20 pages just to get it done, but what if my presentation was 50 or 100 pages? I thought that scripting seemed like a perfect solution.

During the Conference I had to chance to meet the brilliant Martinho da Gloria from automatication.com who wrote the amazing Layout Zone script. I talked to him about the problem of manually exporting each page to an individual SWF and then placing them back into the layout on a new layer. He agreed that scripting was a viable solution and was quickly absorbed in the problem. A few hours later he had finished his SWF Presenter script which automatically exports each page to a swf and places them back into your layout on a new layer.

When you first run the script it will ask you where you would like to save all of the exported SWFs. I generally make a SWF folder inside my links folder for them. Next, the script will then prompt you with the SWF export options. When you click OK the script will batch export each page of the layout to and then place them back into the layout on their respective page. Now you can turn off the original design layer and export your layout with the placed SWFs to PDF. Update: After the script places the SWF on each page, each SWF is set to play on page load.

Downloads

The SWFpresenter script can be downloaded here.*
*updated to version 1.01

In case you are interested in all of the podcasts that I mentioned in my presentation you can download a PDF of them here.

Tags
Related Articles
Comments

93 Comments on “Bringing Animation from InDesign CS5 into a PDF… with the help of a little script

  1. I love the script, just used it for a new business presentation and it looks really sharp.

    My biggest issue with the swf file in pdf is that the cursor doesn’t react to the links and the page up/page down navigation functions stop working.

    If I just export a pdf with buttons the cursor turns to a hand pointer and the button changes to the rollover state. I can page up and page down or use the arrow keys and can navigate the pdf just fine.

    If I use the script and the whole page becomes a swf which is then exported to an interactive pdf, for some reason the cursor doesn’t turn into a hand pointer when hovering over a link, and the page up/page down, and arrow keys don’t work to navigate through the pages.

    I can use the non-animated version for now – but I sure would like to find a solution to this swf/pdf issue so I can start sending pdfs with a richer user experience.

    Any thoughts?

    Peter

  2. Hi there,

    I’m using the script to get my animations and interactive SWF content into an interactive PDF. Everything is working great except, where I have a swf file created in Flash, placed in InDesign, and set to play with mouse up on a button. When the button is clicked the space where this placed swf file is just goes blank.

    Any suggestions would be much appreciated.

    Thanks,

    DP

  3. Hi Everyone

    I am currently working on a presentation/brochure where I would like to have some videos to show along with the text. So far so good. But I would like to start the video with a button like the one you see on Youtube…a button that are placed on the video and disapear when you start the video (press the button). I need animations to get the button to disapear, but animations does not work in pdf and unfortunately that is my preferred filetype as the file is going to be read by many differrent people with different know-how about filetypes, computer etc. and I beleave that everyone knows the pdf and have reader installed and knows the the way it works on Youtube (you press the play button on the video and the button disapears and the video are playing)

    Anyone who can help?

  4. @ Christina

    You can’t link to a YouTube video inside InDesign or Acrobat. In order to link to an online video, you have to have a URL to the video file, not just the webpage. However, there are a bunch of ways to download YouTube videos to your computer. With this file, you could them embed it into your PDF.

    Regarding the button that disappears, this is a poster frame. To create a poster frame, just make a jpg that you want to be the image placeholder above your video. I recommend taking a screenshot and then adding a play button in photoshop. Save this file and use the media panel to add the poster image to the selected video in InDesign.

    You can’t really use animations to make this button disappear. It will just disappear when pressed.

    I hope that helps!

  5. @ James

    I don’t want to link to a YouTube video, I just mentioned YouTube to illustrate the play button I wanted :-)

    I have tried out your idea to make a poster with a button. I works great! You only miss the Roll over effect and I can live with this as I think it is better to have the button within the poster and leave out the Roll over instead of building a button outside the frame of the movie (I think this mess up my layout in my current presentation)

    Thank you!

  6. There is another workaround that you could try.

    Create a button (with a rollover state) and add an action to the button that plays the movie. The only problem is that the button need to be underneath the video.

    You could add a second action to have the button hide itself after pressing it, but then the button would be gone and you couldn’t get it back again.

  7. I am new to Indesign and not familiar with a lot of the above. One simple question: can I made an object state be a slide show without having to click on a button to activate it to go to “next state” or “previous state”. I want it to play the slide show upon load. Is that possible in CS5?

  8. @Teri,

    That is a good question.

    If you are looking to create a SWF based slideshow, it really isn’t possible to have a slideshow play on page load. Object state slideshows require user interactive to go between states. However, you could have a series of images animate in and disappear one after another, then repeat them with the timing panel.

    However, if you are using the Adobe Digital Publishing suite (creating apps for the iPad), you can use the overlay creator to auto play the slideshow on page load.

  9. If I had a series of images animate in and disappear, could they be stacked or do they have to be in different “boxes”?

  10. One more problem I am having; I set up each image separately and have them fading in and disappearing (one after the other); however, when I want to “loop” it under “timing”, it is grayed out and I do not have that option.

  11. How can I get rid of the Flash icon and “click to activate” button, and just have the animation PLAY when I open the interactive pdf?

  12. Hi I’ve created and interactive pdf with imbedded swf pages and regular pages. However when using my interactive buttons to navigate between the 2 types of pages the arrows aren’t working properly. From a swf page to regular page it skips over the next page then jumps back.

    any ideas? anyone experienced this problem?

  13. The SWFpresenter script is wonderful. It’s a great solution and so easy to use. I created a presentation and it runs smoothly when viewing on my mac. However, when I sent it to my manager for review, it took an extremely long time for each page to load on her PC. Has anyone experienced an issue like this? I’m running CS5 v. 7.0.4. Thanks!

  14. Hello,
    First excuse my English (translator).

    I used SWF presenter in InDesign CS5 and after export PDF in Acrobat 9, interactive links “next page” and the transition from page “turn the page” not working.
    The animations are ok.

    Thank you in advance for the help.

  15. i’m making interactive magazine for ipad using indesign cs5.. the thing is the animations won’t work when viewed in the ipad because it doesnt support abode flash.. is there any work around here? or any other suggestions on what to use in creating a magazine with animations for apple newsstand? thanks!

  16. Esin it’s definitely possible but it more expensive and a bigger learning curve than you think. You’d need to use something like Adobe’s Digital Publishing Suite (aka DPS), and add-on to InDesign CS5/CS5.5, and sell it as an app (and thus have to become an Apple iPad developer, $99/yr); or use an alternate publishing system like eDocker’s Tablet Publisher, which we talk about on our latest podcast, #166 … see the Show Notes page here for a link and a discount.

    http://indesignsecrets.com/indesignsecrets-podcast-166.php

  17. thanks anne, the thing is i’ve already been using dps, i upload using folio builder from indesign cs5.. the problem is when i view the magazine in adobe content viewer, the animations don’t work probably because flash is not supported in ipad.. any suggestions on how to make them work? i’ve seen other inewsstand magazines and they have animations working.. thanks a lot

  18. @Esin: The only way to get animations in DPS folios on the iPad is to create them as HTML5 animations. So you can use Adobe Edge or Wallaby — both are beta, though I’m not sure Wallaby is even supported anymore. I have seen a lot of cool stuff with Edge, though (see labs.adobe.com).

    But the short version is that it is very hard to get the Animation features in InDesign into DPS. It’s very sad, because they are great features, but Adobe made the wrong bet by making everything Flash-based.

  19. Hi
    I tried the script for interactive page turn in idcs5 but it does not work when i export to a pdf. could you tell me why
    thanks
    mh0s08

  20. How do i make the final intreractive PDF go to the next page on a click once all of the animations are complete on each page?

  21. Hi,

    I have followed ur instructions and its working..:) but, can u suggest me how to run this pdf without flash software!! because iam doing a E-brochure which will be sent to our clients they may not having these softwares so please suggest as early as possible is there any other way

  22. How can I get rid of the Flash icon and ?click to activate? button, and just have the animation PLAY when I open the interactive pdf?

  23. @Andrew: I don’t think that’s possible. The SWF doesn’t actually know anything about the PDF and can’t control it.

    @Sindhu: Sorry, but that’s the point — these are SWF/Flash files. We all hope that Adobe updates these animations to work in HTML5 someday.

    @Patrick: Please read the comments in the block post — you have to set up Play on Page Load in the Media panel. As for installing the script, see: http://indesignsecrets.com/how-to-install-scripts-in-indesign.php

  24. My animated pdf works fine the first time I play through the sequence however when I set acrobat to loop the pdf all of my animated swfs on each of my pages dont re-animate the second or third time around?

  25. Hi :)

    I am trying to make a presentation that has videos embedded in it… I can do that no problem and they play fine. However, I would like to overlay text over the videos. I have tried exporting it as a SWF file and everything works great until I try to view it in full screen when the text disappears. When I exit full screen the text reappears.

    Any suggestions? Would be hugely appreciated.

      • @David

        Hi David, thanks for the reply. Unfortunately still the same issue. Any other ideas?
        Thanks again

        Fraser

  26. My question is less about the script, but I CAN NOT get the SWF to have a circular frame. I have a series of images I would like to click through on a page within a “bubble”. But Every time I make MSO and button they work but do not preserve the “bubble” look. I have also tried subtracting out a bubble and sending the SWF to the back. The animation always works when exporting to interactive PDF but the original image always shows through without “bubble” frames…this is driving me nuts. It is probably so simple but cant figure it out. I guess essentially I want the MSO to be bound to a circle frame.

  27. Hi!
    Thanks for this post.
    I have to create a pdf presentation where slideshows and movies are on one page. For e.g. when I export one page with a slideshow animation and a movie with play and stop buttons everything works perfect in the swf file. When I place the swf file back in Indesign to export as an interactive pdf the movie is not playing when I open the pdf. What can I do?
    Thanks!

      • Thanks for your reply.
        I made two seperate buttons next to the movie. One button says play and controls the embedded movie. In the swf it works perfect but not after I placed the swf back in Indesign and exported it as an interactive pdf.

  28. Hi, Ive downloaded the script..
    but im a beginner for such things..

    is there a post which guides through how to run the script with step by step method?

    Where do i install the script?
    I really dont get it
    Do i import it somewhere in indesign?

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>