Using Page Actions to Trigger Events in PDFs

When you open or close a page in a PDF document Acrobat raises a little ‘event’ that you can hook into to activate a movie, play a sound or even run a Javascript code.

To demonstrate Page Actions let’s make a movie start playing when the page is opened.

Open your PDF document and insert a Movie using the Movie tool from the Advanced Editing toolbar.

Once you have a movie inserted (Windows users can insert the test movie in the Windows directory: clock.avi), open the ‘Pages’ pane (View>Navigation Tabs>Pages).

Right Mouse Click (Mac: Control + Click) on the thumbnail for the page that you have inserted the movie into and choose ‘Page Properties’.

There are two trigger types for hooking into Page Actions, the first is to hook into the Page Open action and the other option is the Page Closed Action. Choose the Page Open trigger type.

From the ‘Select Action’ drop down box choose ‘Play Acrobat 6 Compatible Media’ (or version 5 Compatible Media is applicable).

Now click ‘Add’ and select the ‘Annotation from Movie’ that you inserted earlier (also note that you could have also inserted your movie by choosing the ‘Browse’ button).

The next dialog box allows you to select what will happen to the Movie when the Page is opened, choose ‘Play’ from the drop down.

Once you clicked ‘Ok’ you will find your inserted Media will be listed as Media that will play when the Page is opened.

All that’s left to do is save your PDF document. The next time this page (or document if it’s the first page) is opened the movie will automatically start playing.

Note: If you have the movie tool still selected the movie will not automatically play, to correct this simply choose the Hand tool and open and close the page again.

You May Also Like

About the Author: Dave Wraight

Leave a Reply