At Adobe we’ve actually leveraged this capability to enable one of our partners to create Dynamic PDF files for our customer success stories. Almost all of the work takes place in InDesign where they’re most comfortable. The final step happens in Acrobat; they simply run an Action that I developed for them. Seconds later, the job is complete.The Video Player Plus, which is identical to the standard video player that ships with Acrobat 9 and X except for the few additional functions that I added was also used for this project. You’ll see why when I go over the design goals for our dynamic customer success story project.
Many of our customer success stories, which are typically 2-4 page PDF documents, have videos associated with them that reside on Adobe TV and are linked to from the PDF file. This arrangement has worked well but we’ve been toying with the idea of embedding the videos in the PDF files since we released Acrobat 9. The problem was that PDF files with embedded video can get very large very fast. We did have the ability to stream the video into the document but then the user would need to be online and with a fairly robust connection to be able to experience the file in the way we intended. Finally, we could have used the Video Player Plus which I posted over a year ago, to embed a low resolution version and stream an HD version of the video but using it involved some hand tweaking of far too many settings in the PDF file (using Acrobat) to be practical for the typical InDesign user. Finally, not everyone is using the latest readers and some may not even be using an Adobe viewer to read PDF files. We needed to accommodate these users too.
With all of the above in mind, we came up with the following design goals. These are roughly in order of importance.
- The PDF file had to be a practical demonstration of how dynamic a PDF document could be. We wanted to show off the technology and inspire our customers.
- The PDF file would need to provide a good experience if the user was offline and a great experience when the user was online.
- The final PDF file had to be small enough to email. Under 10Mb would be acceptable, under 5Mb was the target.
- Because these documents go through many revision cycles, the authoring process had to be geared towards the user of InDesign and minimize the amount of post processing in Acrobat. The process had to be easily repeatable by users who have very little experience with the advanced functionality of Acrobat.
- Given that the dynamic nature of the file would only work in version 9 or higher, we had to create the file in such a way that users of other PDF tools would be informed that they may not be experiencing the file in the way we intended.
Given all these criteria, specifically that 4th bullet, this project would have been impossible without the use of Actions in Acrobat X.
Take a look at these two examples to see what we finally came up with and then continue reading to see how we did it.
Go to the second page of each document. Notice the button roll-overs. Clicking the first play button will play the embedded video, clicking the play HD button will stream in an HD version of the video.
Engineering the Solution:
The video player that ships with Acrobat 9 and X can play either an embedded video or a video streaming from the web. For this project we needed a player that could do both. Back in the Acrobat 9 days, I created the Video Player Plus which allows for the same video widget in a PDF file to play any number of embedded videos and any number of videos streamed from the web. After my modifications to the default player, the Video Player Plus has the ability to programmatically change the source of the video playing in the video widget as well as store the original source for reference.
Finally, we need a way to make all of this work in a streamlined and repeatable way.
Integrating the new video player with InDesign:
InDesign ships with the same exact default video player as Acrobat 9 and X so it can export PDF files that work with Reader and Acrobat. This means that I could simply replace the default InDesign video player with the Video Player Plus and InDesign wouldn’t know the difference. Since I only added functionality and didn’t change any existing code in the player, InDesign would continue to be able to use this new player to create proper PDF files.
var v = this.getField(“myText”).value
This is because the value of myText is the same no matter what page myText is on. myText can even be present on multiple pages, each one with the same value. Buttons are also considered fields in Acrobat so you can get access to a button’s properties as long as you know the name of the button.
With layers, it’s not so simple. Different pages can have different numbers of layers and these layers can have the same name but be completely unrelated. Nevertheless, if you want to programmatically control the visibility of a layer you need to know it’s name, just like a field, but you also need to know what page it’s on.
Next week, I’ll be posting the InDesign template, instructions for use and the Action to you can try this out at home.