Open the Acrobat JavaScript Console with a PDF Button
Question details
Create a PDF button that opens the Acrobat JavaScript console when clicked.

- 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.
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.
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.
Open the PDF in Acrobat and choose All tools > Prepare a form. Menu names may vary by version.
Use the button tool to add a button, or select an existing button, then open its Properties.
On the Actions tab, select Mouse Up as the trigger and Run a JavaScript as the action. Click Add, enter console.show();, and confirm.
Save the PDF, exit form editing, and click the button in Acrobat to test whether the console opens.

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.

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.




