PDF actions: types and an automatic opening example
By Anton Samper · Reviewed
A PDF action is a stored instruction asking a reader to do something when an event occurs, such as opening the document or clicking a link. Actions can navigate to a page, open a website, work with form data, or run JavaScript. This example uses an opening action to fit the first page in the reader’s window, with no script or external target.
Open this exampleDownload sample PDF
What triggers a PDF action?
The trigger and the action type are separate. The catalogue’s /OpenAction specifies what happens on opening; a link, outline bookmark, or form widget can use /A for its action. Additional-action dictionaries (/AA) associate actions with events such as entering a field or opening a page. An action dictionary’s /S entry identifies its type. An optional /Next entry can chain further actions.
/OpenAction can also hold a destination directly, rather than an action dictionary. Finding it does not by itself mean that the PDF contains JavaScript.
Common PDF action types and what they do
/GoTo,/GoToR,/GoToE- Navigate to a destination in this PDF, another PDF, or an embedded file respectively. Destinations can specify a page and viewing scale.
/URI- Follow a URI, commonly a website address in a clickable link.
/Named- Request a reader-defined operation, such as
/NextPageor/PrevPage. /JavaScript- Run a script, for example to calculate or validate form values. The
/JSentry holds the script text or a stream reference. /SubmitForm,/ResetForm,/ImportData- Send form data to a target, restore fields to their defaults, or load field values from a file respectively.
/Launch- Request that the reader open a file or start an application.
/Hide,/SetOCGState- Change annotation visibility or the state of optional content groups (PDF layers) respectively.
/Thread,/Rendition,/GoTo3DView- Start reading an article thread, control multimedia playback, or select a view of 3D content respectively.
These are common types, not an exhaustive list. Support depends on the reader, PDF version, and security settings; a stored instruction may be ignored, blocked, or require permission. For definitions, see Adobe’s actions and destinations and the PDF 1.7 reference, section 8.5.
1. Locate the opening action
Choose Actions in the explorer. One row lists the opening action: Document opens, type /S /GoTo, a destination of [ 3 0 R /Fit ], held by the catalogue, object 1 0 R. To find it by hand, choose Document catalogue and follow /OpenAction 6 0 R.

2. Read the action dictionary
Choose Inspect action 6 0 obj, or follow 6 0 R, and check Properties or Source:
<< /Type /Action /S /GoTo /D [3 0 R /Fit] >>/S /GoTo requests navigation within the document. The /D array targets page 3 0 R, and /Fit requests that the whole page fit the reader's window. Follow the page reference to confirm where it leads.
3. Check how readers handle the action
A reader may honour or ignore an opening action. PDF Internals exposes the stored request for inspection without executing the action. Its page preview is not a test of whether another reader executes it. This sample has no JavaScript, launch action, or remote destination.
Investigate other action types
For another PDF, open Actions to list its actions, then inspect each action's /S value and follow its references. Scripts, launch actions and form submissions or imports are marked so they stand out. An opening action can serve a routine navigation purpose, as it does here. Its presence alone does not make a file malicious, and its absence does not establish safety. See the suspicious features guide for scripts, additional actions, and inspection limits.