Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Jan 20, 2025 Jan 20, 2025

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

TOPICS
View PDF
453
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 27, 2025 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 20, 2025 May 20, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 20, 2025 May 20, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2025 May 21, 2025

You need to simply use:

app.toolbar = false;

Your second line (with "this" at the start) is wrong and won't work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 21, 2025 May 21, 2025
LATEST

Hey,

So app.toolbar = false doesn't work in DC versions, I did manage to find out its because Adobe stopped it from working. This.toolbar ends up essentially equalling this document, so it does work, but only in one instance, so if you close the document you have open and open a new one and adobe restarts, then it works, however it works every second round. I did manage to put in an if statement so it happens each time. The issue with me using this.toolbar which is not blocked by Adobe, is that if I do not close the document I have open and I open another the new document has the toolbar.

Regards

Tash

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines