Skip to main content
Participant
January 21, 2025
Question

How to hide the menu bar with Java script when open a pdf file

  • January 21, 2025
  • 1 reply
  • 394 views

When open a pdf file, I wanted to hide the whole menu bar (where print, star, delete etc. buttons are present) with java script.

Also wanted to hide "Sign In" and "?" from the top right bar. I could not find any resource so far.

Any help will be highly appreciated.

 

Thanks.

Zia

1 reply

AnandSri
Community Manager
Community Manager
February 27, 2025

Hello Zia!

 

I hope you're doing well, and we apologize for the delayed response and the trouble.

 

Please see this article for more details on how to hide the whole menu bar in Acrobat: https://adobe.ly/4keOa2r

For JavaScript, you may try the following steps. Note that this may or may not work in your machine environment.

 

To hide the menu bar in Adobe Acrobat Reader when opening a PDF file using JavaScript, you can use the following script:

app.toolbar = false;

Here's how to implement it:

  1. Create a Folder-Level Script:

    • Save the script in a .js file (e.g., HideMenuBar.js).
    • Place the file in the JavaScripts folder of your Acrobat installation directory. For example, C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\Javascripts\.
  2. Ensure JavaScript is Enabled:

    • Go to Edit > Preferences > JavaScript and make sure Enable Acrobat JavaScript is checked. 

To know more about disabling the Sign in option, please see these similar community discussions: https://adobe.ly/3EWIpGl

 

I hope this helps.

Thanks,

Anand Sri.

Participant
May 21, 2025

Hi Anand,

 

I have tried this and it does not remove the toolbar at the top of the page underneath the usual top menu. I have managed to make the main menu items dissapear, the left and right panes dissapear, but i cannot make the top toolbar dissapear. 

I have tried using the app.toolbar = false, Zia has also tried with 

app.toolbar = !app.toolbar;

this.toolbar = false;

I have found the old way of customising the toolbars in registry: 

[HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\AVGeneral\cToolbars\

and from there using cbasictools, or cfile, which i found from here: Configure Acrobat Reader tool buttons when Reader ... - SAP Community

I tried to use the cDisabled key underneath one to disable the icons, like save, favourite, save to cloud, select tool etc, using the names in the above post, i have had no luck, I was hoping there would be something else you could tell me to remove this, I assumed it was called toolbar or maybe quick tools, but it not one of the RHP or LHP toolbars, but the top one.

 

Regards

Tash

Participant
May 21, 2025

I would like to note that using Zias method of:

app.toolbar = !app.toolbar;

This.toolbar = false;

Works every second time you open a pdf.

I assume this is because ! Changes the boolean to its opposite value, However using app.toolbar = false had yet to work at all. 

Thanks

Tash