Other PDF Issues

Open the Acrobat JavaScript Console with a PDF Button

Maira MehtabMaira Mehtab Nov 25, 2026 868 views

Question details

Create a PDF button that opens the Acrobat JavaScript console when clicked.

Open the Acrobat JavaScript Console with a PDF Button
Product
Adobe Acrobat
Device & OS
not provided
Scenario
The user wants to add a button action to a PDF for opening the JavaScript console.
Observed behavior
Clicking the button should display the JavaScript console in a supported Acrobat product.
Before you start

Open the PDF in a desktop Acrobat product that supports form editing and the JavaScript console. In Acrobat Preferences, check that Acrobat JavaScript is enabled.

Solution 1Recommended

Add a JavaScript action to an Acrobat PDF button

Use a button's Mouse Up action to display the console when the button is clicked.

1
Open the form editor

Open the PDF in Acrobat and choose All tools > Prepare a form. Menu names may vary by version.

2
Create or select a button

Use the button tool to add a button, or select an existing button, then open its Properties.

3
Add the JavaScript action

On the Actions tab, select Mouse Up as the trigger and Run a JavaScript as the action. Click Add, enter console.show();, and confirm.

4
Save and test

Save the PDF, exit form editing, and click the button in Acrobat to test whether the console opens.

Add a JavaScript action to an Acrobat PDF button
Use a supported Acrobat product: The console action requires Acrobat JavaScript to be enabled and a product that supports the JavaScript console. A browser PDF viewer or another PDF application may not run the action.
Free Microsoft Office alternative

Use WPS Office for Everyday PDF and Document Work

WPS Office is a free, lightweight alternative for viewing and annotating PDFs and working with Office files. Its familiar interface and format compatibility make it easy to move between common document workflows; it does not replace Acrobat's JavaScript console.

View and annotate PDFs for everyday reviewOpen and work with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse a familiar interface for an easier transition from Microsoft OfficeWork with documents in a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

What script opens the Acrobat JavaScript console?

Add console.show(); as a Run a JavaScript action on the button's Mouse Up trigger.

How do I enable JavaScript in Acrobat?

Open Acrobat Preferences, select JavaScript, and enable Acrobat JavaScript. The exact location of Preferences can vary by operating system and Acrobat version.

Why does the button not open the console in my browser?

Browser PDF viewers may not support Acrobat JavaScript actions or the Acrobat console. Open the PDF in a desktop Acrobat product that supports the console and test the button there.

Can WPS Office open the Acrobat JavaScript console?

No. The JavaScript console is an Acrobat feature. WPS Office can be used for everyday PDF viewing and annotation, but it does not open Acrobat's console.