Recently in Rich Media Annotations Category

QR Code Generator for Acrobat

| 13 Comments
Share

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.

Share

This article is part two of “Actions in Action at Adobe”. Please read through the first article and familiarize yourself with and install the Video Player Plus before continuing.

Note: Instruction in this post require Adobe Acrobat X Pro

Overview:

The new Actions Wizard in Adobe Acrobat X can be leveraged to automate repetitive tasks. One such task is the ability to add document level JavaScript and set actions on objects in a PDF document. Because object level JavaScript can only be attached to specific objects, buttons and layers, in this use case, strict naming conventions must be adhered to when authoring documents using InDesign.

Actions in Action at Adobe

| 1 Comment
Share

The new Actions Wizard in Adobe Acrobat X can be leveraged to automate repetitive tasks. One such task is the ability to add document level JavaScript and set actions on objects in a PDF document. Basically, you can write an Action to automate the addition of complex interactivity that would otherwise be tedious and prone to human error.

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.

Introducing the Video Player Plus Widget for Acrobat

| 13 Comments
Share

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.

Play the Same Video from Any Page

| No Comments
Share

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.

Hide and Show Rich Media in PDF Files

| 3 Comments
Share

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.

My SWF Doesn’t Work When I Embed it in a PDF File…

| 4 Comments
Share

…but it works just fine in the browser. What’s wrong?

Share

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.

How We Did It: Part 5 – The Ultimate Tourney Guide

| No Comments
Share

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.

Conclusion:
That’s how we did it! Now it’s time to return to your regularly scheduled blogging.

Note: As I mentioned in the beginning of this article, this technique requires no developer skills, so – for all you JavaScript developers out there, if this post left you feeling like you want a little more, here’s another great article about using buttons in Acrobat by Thom Parker: Automatically Add Buttons to a PDF.

How We Did It: Part 4 – The Ultimate Tourney Guide

| No Comments
Share

This article is Part 4 of 5. Please start with Part 1 if you have not done so already.

In Part 3 of this series, I discussed the new Acrobat 9 security model and its impact on the "Ultimate Tourney Guide" project. But, what if you hadn’t already installed Acrobat or Reader 9? Because we wanted to create an outstanding first-open experience, we wanted users of earlier versions to see something better than just the update dialog and a static file. So, we added an image to the first page that only Acrobat 9 or Reader 9 can hide. This made it so that the PDF file would be seen properly in the right version but degrade beautifully if not. We used Acrobat forms functionality and a little JavaScript to pull that off. In this article, I’ll tell you how we did it.

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:
This part is easy. The app object in the Acrobat JavaScript API can be used to detect the viewerVersion property of the application that the PDF file is being viewed in. We added this kind of code to the Document JavaScripts outside of any function so that it runs just as the document opens.

if (app.viewerVersion >= 9)
{
//do the version 9 or higher code
}
else
{
//do the lower version code
}

Note: As a best practice, you will also want to check the viewerType and viewerVariation. The viewerType and viewerVersion can be used to detect if your PDF file is being viewed in an Adobe product. Most non-Adobe viewers do not have a JavaScript interpreter for PDF files and the ones that do have an incomplete implementation.

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:
We added layers to the PDF file format in version 1.5 and a Layers panel to control their visibility in Acrobat 6. Additionally, Acrobat JavaScript can be used to hide or show a layer and all you need to know is the name of the layer. In the Acrobat JavaScript API, layers are referred to as OCGs or optional content groups and their visibility can be controlled by setting the state property.

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:
Templates are named pages within the PDF document. These pages may be hidden or visible and can be copied onto an existing page as an overlay or “spawned” as a new page using JavaScript. We are using this technique with some other version-dependent projects but in this particular case, we decided to use Buttons to achieve the effect we wanted in the Ultimate Tourney Guide.

Hide and Show a Button:
We decided to use a button that covered the first page of the PDF file entirely. Buttons in PDF files can display on the page with a label, as an icon, or both. You can create button icon from any PDF file and control its behavior; read how.  We created a PDF file (right) that was the exact same size as the first page, created a button on the first page and then imported that PDF file as the button icon for that button. By default, this button is visible which is what we want. With the following Acrobat JavaScript in the Document JavaScripts area we can hide the button if the viewerVersion is higher than 9. This takes care of the Adobe Acrobat and Reader versions 9 and those that are less than 9.

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.

Conclusion:
By using some very basic Acrobat JavaScripts, we were able to customize the experience for people who use Acrobat or Reader 9, lower versions of Adobe’s viewers as well as non-Adobe viewers far beyond what is generally available in the various products. In the final part of this series, I’ll revisit the use of buttons but this time I’ll discuss how we created that stunning first page using the simplest of techniques.

Read Part 5