Related subjects →  Interactivity .

From its inception, users of a PDF document can interact with its content. Thus, for example, when a user opens or closes a file, or clicks on a particular link or point in the document, the creator may have included a specific action to be executed (go to a location in the document, play a sound, etc.).

Actions inside a PDF.

Possible actions are limited, as the options available to those allowed, although new parameters and actions are often included with each revision of the format.

Inside a document, actions are defined in dictionaries, although their structure has changed with the different levels of the PDF format (they are basically annotations). It is not unusual for the execution of several of them to be grouped together.

PitStop's lists of actions currently specifically recognise the following actions (although they may act on some other unspecified actions):

  • GoTo: it goes to a specific point in the active document and displays it.
  • GoToR: It goes to a specific point in another (i.e. remote) document and displays it.
  • Launch: Launches an application, usually to open or print a file.
  • Thread: It goes to a particular location in a reading sequence set out as an article (in the sense of the PDF format).
  • URI: It sets a resource accessible on the Internet. It is usually a hyperlink (which may contain a  query in its parameters).
  • Sound: A sound is played.
  • Movie: A video is played.
  • Hide: Toggles the hidden or unhidden status of one or more annotations in the document.
  • SubmitForm: Data from a form are sent to a URL.
  • ResetForm: The fields of an interactive form are reset to their original values.
  • ImportData: Data from a specified file are imported to the specified location.
  • JavaScript: A JavaScript is run.
  • Named: This is a set of the following four named actions:
    • NextPage: Go to next page.
    • PrevPage: Go to previous page.
    • FirtPage: Go to the first page.
    • LastPage: Go to the last page.
  • SetOCGState: The status of one or more layers (Optional Content Groups (OCG)) is set.
  • Rendition: It controls the rendering of multimedia content (which does not need to be visible at the moment).
  • Trans: It defines the transitions to be displayed on screen during the execution of a sequence of actions.
  • GoTo3DView: It identifies a 3D type annotation and specifies the details of its presentation.
  • SetState: It sets the state of display of an annotation (in the sense of the PDF format).
  • NOP: This action does nothing by itself. It is an action defined at PDF level 1.2 to override the activation of other actions.
  • GoToDPart: This action, existing from level 2.0 of the PDF format, is used to create bookmarks or buttons that lead to a specific part of a document regardless of its page number.
  • GoToE: This action is similar to "GoTo" but allows us to jump to a PDF embedded in another PDF.
  • RichMediaExecute: This action is used to identify a rich media annotation and specify how to run its reproduction.

Actions are interactive elements and are forbidden in the PDF/X standards, which are intended for printing. The PDF/A standards also prohibit most of them.