Accessing Javascript console in Acrobat X Std
Copy link to clipboard
Copied
Good evening,
for some reason the "Ctrl + J" shortcut does not work on my Acrobat X Std. The shortcut does show up in the helpfile so I assume there is something wrong. Does anybody else have the same issue?
Thanks
Copy link to clipboard
Copied
Check the JavaScript preferences, and activate the according options. After a restart of Acrobat,
the console should pop up... (hopefully).
HTH.
Max Wyss.
Copy link to clipboard
Copied
Thks - I tried that before. For the time being the only way that I can access the console is by forcing an error in a script. Reparing Acrobat does not help. Deleting the preferences seems to have no influence at all.
Copy link to clipboard
Copied
I have put the Debugger on the quick bar along with Edit Document Scripts.
You need to either create a form or edit a form, Open the 'Forms' tool in the 'Tools' well, select the "More Tools" and find the tool you want added to the quick bar. I believe you can right click for the context menu to add the tool or drag and drop the tool to the quick bar.
I have found the Ctrl + J shortcut does not always work with many versions of Acrobat. Many times this occurs when there is a JavaScript error somewhere in the code. If you have ever had to install the code for the JS console, you will see that the console object is run by JS code.
Copy link to clipboard
Copied
If you are working with acrobat X, then the console is no longer in the menus, but rather on the right under the "tools" section, under "javascripts".
Copy link to clipboard
Copied
Thank you for your input. I checked all the possibilities and the sad fact remains that in my Standard version only one item shows up under "Javascript" (i.e. "Define Document Actions"). My (uneducated) guess is, that there is a difference regarding the JavaScript tools between the Pro and the standard edition, since everything shows up allright on the Pro (Test) version.
Copy link to clipboard
Copied
OK, I get it. Try the following:
Create a plain text file with the following code "console.show()", you can call it something like "open console.js".
If you are on a Mac:
Open up your Acrobat app by right clicking and picking "Show Package Contents", navigate to Contents/Resources/JavaScripts and put the script there.
If you are on a PC:
Place the above script in /Program Files/Adobe/Acrobat ?/Acrobat/JavaScripts
Then restart your Acrobat and hopefully after start-up your console will pop open.
Copy link to clipboard
Copied
Yeah - that worked! Thanks a lot.
Copy link to clipboard
Copied
You could add a tool bar button to open the JS console and then move that to the quick bar.
Copy link to clipboard
Copied
Not to resurrect a dead post, but this was just relevant to me.
I added a "Show Console" item to my Edit dropdown with this little bit of js added in the aforementioned folder:
app.addMenuItem({cName:"Show Console", cParent:"Edit", cExec: "console.show()"})
Copy link to clipboard
Copied
I have the same problem: Acrobat X, no access to console (ctrl-j no effect, Tools-Javascript has only one command: "Set document options"; the settings on preferences for Javascript do not include "enable interactive console" as instructed on otherwise clear page https://acrobatusers.com/tutorials/javascript_console (thank you). I cannot find reason or solution to activate the console and I cannot use the suggestions above in this chain to place a script.js file to the C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\Javascripts folder due to admin rights issue; I find the corresponding folder in the C:\Users\ohaf\AppData\Roaming\Adobe\Acrobat\10.0\JavaScripts, but placing .js files there do not seem the make any difference; I have used Task manager to kill all acro* processes and do restart Acrobat; trying both reader XI and Acrobat X, but cannot activate console. Anybody, any change to do this without being able to write to the program files -folder?
Copy link to clipboard
Copied
Download this file and click the button in it: Show JS Console.pdf - Google Drive
Copy link to clipboard
Copied
Thank you, worked immediately. I got a dialog asking if I want to enable the console, and after that I was able to run this command below on the console to add it to the View menu (it took a moment to realize that by pressing ctrl-enter I can run a line on the console).
app.addMenuItem({cName:"Console Window", cParent:"View", cExec:"console.show()"});
Great help, thank you for solving my problem!
Copy link to clipboard
Copied
But then my problems continue: View console -command appeared in the View menu ok after running the app.addmenuitem -line above, but when I close and restart Acrobat X, the it is again gone. Obviously Acrobat was not authorized to store this setting someplace - but where? Our IT support is not able to give any advice re. javascript and does not seem helpful regarding this issue of using the console. Any suggestions?
Copy link to clipboard
Copied
The only way to make it always appear is to put it in a folder-level script. Ask your IT people to copy the js file for you into the right folder, and the problem should be solved.
Copy link to clipboard
Copied
Thank you - works as you proposed: viewconsole.js script with the add menu statement in the C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\Javascripts makes the command appear in the View menu when Acrobat is started. Thumbs up!

Copy link to clipboard
Copied
Brilliant ! Your solution was the only one that worked for me after hours of aggravation. TSM
Copy link to clipboard
Copied
I am having the same problem in Adobe Acrobat Pro X. Under tools it does not show Java script. I have tried control J and a window pops up but the java script is not showing in the control panel under tools.
I tried to do a simple text and save it and then drag into the java folder but that did not seem to work.
I need to change the expiry date on some through java script on a file that Was created on another machine that had the java script option showing under tools Unfortunately I can not do it on my new machine.
Please help
Copy link to clipboard
Copied
Exactly which folder did you place the text file, and what is the files name, exactly? It's necessary to rester Acrobat after you add or edit a folder-level JavaScript file for the change to have an effect.
Copy link to clipboard
Copied
The "JavaScript" panel needs to be enabled in the Tools pane menu before you can see and use it. One way to do that is to select "View>Tools>JavaScript" from Acrobat's menu.
Over the lifetime of Acrobat X, the user level JavaScript folder was moved for security reasons (at least on Windows). Make sure that you have the correct path for your version of Acrobat X. All later versions require the "Privileged" folder in the path: C:\Users\<your user name>\AppData\Roaming\Adobe\Acrobat\Privileged\10.0\JavaScripts
Copy link to clipboard
Copied
THanks Karl. View tools javascript worked. Not permanent but can turn on when needed
Copy link to clipboard
Copied
This should be permanent, until you turn it off again. You can also try to use the tools pane menu:

