User Guide Cancel

Apply actions and scripts

Before you begin

We're rolling out a new, more intuitive product experience. If the screen shown here doesn’t match your product interface, select help for your current experience.

In the new experience, the tools appear on the left side of the screen.

What are actions?

You can set your document with actions that are triggered when a bookmark or link is clicked or when a page is viewed. For example, use links and bookmarks to navigate different document locations, execute commands, and perform various tasks. Set actions in the Properties dialog box.

For other items like pages, media clips, and form fields, establish a trigger that initiates the action, and then define the action itself. Assign multiple actions to a single trigger.

The Locked option safeguards an object's look and feel and actions from unintentional changes.

Add an action to bookmarks, form fields, buttons, or clips

  1. From the Bookmarks panel, right-click on a bookmark and then select Properties.

    Or, double-click the Link, media clip, or form field and choose Properties.

  2. Select the Actions tab.

  3. In the Select Action menu, choose the desired action type and select Add. You can add multiple actions which will execute in the order they appear in the Actions list box.

  4. (Optional) In the Actions tab, select an action and use the buttons to reorder, edit, or delete it.

  5. Select OK to confirm the actions.
    Close the Rich Media tool by clicking the cross icon at the right end of the toolbar.

Add actions to page thumbnails

To enhance the interactive quality of a document, you can specify actions, such as changing the zoom value, to occur when a page is opened or closed.

  1. From the right panel, select the Page thumbnails icon.

  2. Select the corresponding page thumbnail and select Page properties from the options menu.

  3. Select the Actions tab.

    actions-1

  4. From the Select Trigger menu, choose Page Open to set an action when the page opens, or choose Page Close to set an action when the page closes.

  5. From the Select Action menu, pick an action and then select Add.

  6. Determine the options for the action and select OK.
    Available options depend on the chosen action.

  7. To create a sequence of actions, select another action from the menu and select Add.
    Use the Up and Down buttons to order the actions as desired.

    Note:

    If you set an action to switch to Full Screen view on Page Open or Page Close, the same page will open or close in Full Screen view next time.

  8. Close all open dialog boxes, if any. Select the cross icon at the right end of the toolbar to close the tool.

Action types

Here are the actions you can assign to links, bookmarks, pages, media clips, and form fields:

  • Execute A menu item: Performs a specific menu command.
  • Go to a 3D/Multimedia view: Directs to a designated 3D view.
  • Go to a page view: Navigates to a chosen destination in the current or another document.
  • Import form data: Imports form data from another file into the active form.
  • Multimedia Operation (Acrobat 9 and later): Executes an action for a multimedia object in the file, like playing a sound file. Add the multimedia object to the file first.
  • Open a file: Launches and opens a file. To open a linked file in a PDF, the reader needs the native application of the linked file.
  • Open a web link: Directs to a specific Internet destination using http, ftp, or mailto protocols.
  • Play a sound: Plays a chosen sound file, embedded in the PDF document.
  • Play media (Acrobat 5 Compatible): Plays a QuickTime or AVI movie, embedded in a PDF document, and compatible with Acrobat 5.
  • Play media (Acrobat 6 and later Compatible): Plays a movie, embedded in a PDF document, and compatible with Acrobat 6.
  • Read an article: Follows an article thread in the current or another PDF document.
  • Reset a form: Clears previously entered data in a form. Use the Select Fields dialog box to select reset fields.
  • Run a JavaScript: Executes a specified JavaScript.
  • Set layer visibility: Determines active layer settings. Set the layer settings before adding this action.
  • Show/Hide a field: Switches between displaying and hiding a field in a PDF document. Useful in form fields, for example, to show an object when the pointer is over a button and hide it on Mouse Exit.
  • Submit a form: Transmits form data to a specific URL.

Trigger types

Triggers activate actions in media clips, pages, and form fields. For example, you can set a movie or sound clip to play when a page opens or closes. Available options vary based on the specific page element.

For media clips and form fields (not links or bookmarks), you can use the following triggers:

  • Mouse Up (Acrobat Pro): Activates when releasing the mouse button after a click. This common button trigger allows users to avoid activating the action by dragging the pointer off the button.
  • Page Visible (media clips only): Activates when the page with the media clip becomes visible, even if it's not the current page. This can happen when pages are displayed side by side in a continuous page layout.
  • Page Invisible (media clips only): Activates when the page with the media clip is no longer in view.
  • Page Enter (media clips only): Activates when the page with the media clip becomes the current page.
  • Page Exit (media clips only): Activates when a user leaves the page containing the media clip.
  • Mouse Down: Activates when clicking the mouse button (before releasing). Mouse Up is generally the preferred trigger.
  • Mouse Enter: Activates when the pointer enters the field or play area.
  • Mouse Exit: Activates when the pointer leaves the field or play area.
  • On Receive Focus (media clips only): Activates when the link area gains focus, either through a mouse action or tabbing.
  • On Lose Focus (media clips only): Activates when focus shifts away from the link area.

About JavaScript™ in Acrobat

Netscape Communications developed JavaScript to simplify the creation of interactive web pages. Adobe has improved JavaScript for easy integration of this interactivity into your PDF documents.

You can use JavaScript code with actions tied to bookmarks, links, and pages. The Set Document Actions command lets you create document-wide JavaScript actions. For instance, selecting Document Did Save triggers the JavaScript after saving a document.

Acrobat Pro is needed to use JavaScript with forms and action wizards.

In Acrobat Pro, you can also use JavaScript with PDF forms and action wizards. Typical uses of JavaScript in forms include formatting, calculating, and validating data, and assigning actions. Field-level scripts, tied to specific form fields like a button, run when an event like a Mouse Up action happens.

To learn how to create JavaScript scripts, download the JavaScript manuals from the Adobe website. The 'Developing Acrobat Applications Using JavaScript' provides background information and tutorials, while the 'JavaScript for Acrobat API Reference' offers detailed reference information. You can find these and other JavaScript resources on the Adobe website.

Get help faster and easier

New user?