A few customers have asked me recently if they can add a QR Code to a PDF file for each link they have on the page. We all know that PDF files can have links to external material. But, PDF files often get printed… and the last time I checked, you can click on a piece of paper all day long and it won’t execute a hyperlink. However, a piece of paper can display a bar code and most smart phones can read a QR code.
Recently in Rich Media Annotations Category
Note: Instruction in this post require Adobe Acrobat X Pro
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.
Here’s another tool for those of you interested in playing video inside of Acrobat.
The standard Video Tool in Acrobat 9 allows you embed a single video the PDF file or stream it from a URL and allows you to play a video in your PDF file. But what if you wanted to play more than one? What if you wanted to embed a small, low resolution video but provide the option to stream an HD version with the click of a button. Using the default video player, you would need to add separate widgets which may not be the behavior you really want.
The Video Player Plus Widget for Acrobat allows you to…
- Embed multiple videos in the same video widget
- Programmatically switch between the embedded videos and streaming content
- Programmatically switch between embedded player skins
- Programmatically change the skin color and behavior
You can even use the Video Player Plus Widget to replace the default video player that ships with Adobe Acrobat 9.
It seems like I get a new question about playing video in PDF files every day. Adding dynamic content to PDF files seems to be catching on. Here’s the question… paraphrased for clarity.
I’d like to put a video on page one that opens in a floating window and use a button to start it from anywhere in the document.
I’ve been getting a lot of questions lately from developers who want to use the new Rich Media Annotations (RMA) in their PDF files but are having trouble migrating from the legacy MediaPlayer objects. The main problem is that they want to be able to toggle the visibility of an RMA but can’t; RMAs don’t have a "visibility" property like the MediaPlayer object does.
…but it works just fine in the browser. What’s wrong?
Adobe Presenter 7 is one of the great new applications that is included in Adobe Acrobat 9 Pro Extended. With just a few clicks in PowerPoint, you can transform drab presentations into engaging Adobe® Flash® multimedia experiences. You can easily add narration, animations, interactivity, quizzes and software simulations to your presentations and then export that to a PDF file. If you haven’t seen it in action, I’ve got a great example here.
This article is Part 5 of 5. Please start with Part 1 if you have not done so already.
In Part 4 of this series, I discussed how we used a button to alert users if they needed to update their viewer to Adobe Acrobat 9 or Adobe Reader 9. In this final article on the topic of the "Ultimate Tourney Guide" project, I’ll move away from a strictly “developer” focus and talk about something the typical knowledge worker can do to make their documents stand out.
Acrobat Buttons, Button States and Button Icons:
A button can have a label, an icon, or both. You can change how the button appears in each mouse state (Up, Down, and Rollover). For example, you could create a button that has a “Home” label until the mouse is moved over the button, when it might have a “Click to return to Home page” label. You actually don’t need any developer skills to create roll over buttons, the Acrobat user interface is enough. You can read about how to go about making buttons change appearance in the Acrobat 9 online help.
For stylistic reasons, we chose to use bitmaps for our button icons in the Ultimate Tourney Guide but I like to use vector art for my own projects. Vectors tend to scale better when you can’t anticipate the zoom level that the PDF file will be viewed. Roll your mouse over the embedded PDF file below to see the buttons in action.
Simple But Cool:
The secret to making these buttons work well with the reflections and the background image is to create them in Adobe PhotoShop using a transparent background and save them as PDF files from there. Alternatively, you can use whatever image editing software you like, save the file as a .png and then drag the .png file onto the Acrobat icon to convert it to a PDF file to retain the transparency. In the example above, the button’s “Up” state is one bitmap and we used a different bitmap for both the “Down” and “Rollover” states. Then we added a “Go to a page view” action to the “Mouse Up” event. In the embedded PDF file below, I have used vector artwork (created in Adobe Illustrator) as my button faces and have 3 separate PDF files set for each of the individual button states. Roll over and click on the orb to see the state changes.
That’s how we did it! Now it’s time to return to your regularly scheduled blogging.
This article is Part 4 of 5. Please start with Part 1 if you have not done so already.
Hiding and Showing PDF Content:
What Were Our Options?
When we were examining how to create a file that displayed one way in Acrobat and Reader 9 and a totally different way in earlier versions as well as non-Adobe viewers, there were several options. We needed to determine which would work best for this particular project. Please note: any of the following options are a good way to do this. Determining which is the best for your project will be dictated by your specific needs.
There are two things that we needed to be able to do programmatically with the PDF file in order to achieve the effect that we wanted; detect the version of Acrobat being used and to cause some sort of object to display or not.
Detecting the Version:
if (app.viewerVersion >= 9)
//do the version 9 or higher code
//do the lower version code
Now that we can detect the version number, we can take action on an object that we want to hide or show depending on what the version number is. The question now is, “Which technique do we use?”
Hide and Show a Layer:
Because we used Buttons on the first page and we wanted those buttons to not show in earlier versions of Acrobat or Reader, we decided not to use this technique for the Ultimate Tourney Guide first page. The Z-Order of buttons is on top of the page content and OCGs are part of the page content… they’re just optional.
Hide and Show a Template:
Hide and Show a Button:
if (app.viewerVersion >= 9)
this.getField(“v8_button”).hidden = true;
Button icons in non-Adobe viewers:
Because of the way that the button icon appearance is stored in a PDF file, non-Adobe viewers will be able to display the default button icon even if that viewer doesn’t understand that it is a button. Additionally, the fact that the Z-Order of form fields and buttons is on top of the regular PDF page content, the button will also completely cover anything that sits below it. Now we have a solution for displaying the upgrade message in non-Adobe viewers.