Skip to main content
Known Participant
May 21, 2020
Question

What is the preferred way of adding a menu to adobe Reader C++ Plugin or JavaScript plugins ?

  • May 21, 2020
  • 2 replies
  • 1862 views

I have a question , Will adobe continue to support JavaScript to add menus to adobe in future. Which is the standard way. I have read documentation https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FOverview_UsingSDK%2FDeciding_between_plug-ins_and_JavaScript.html  when to use what, I can achieve it using both plugin and javascript.  Which one is best

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
June 3, 2020

The Acrobat JavaScript function "app.addMenuItem()" adds a menu item to an existing menu, it cannot create new top level menus. Top level menus can only be created with a plug-in. Which you use depends on what you want to achieve, and your capabilities. I use both. And some times I mix them up. I'll create a plug-in to add a top level menu. Then add items to it with JavaScript. 

 

There is no reason to think that any of the menu item functions in the plug-in SDK or the JavaScript model are going to go away. These are very important user interface items.  

But if Adobe did decide to take them away, be assured they wouldn't consult with us first. . 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
March 14, 2024

Hello,

 

I've added a menu item in adobe wiht java script

app.addMenuItem({

cName: "NEW MENU ITEM"
,
cParent: "File",

cExec: "mySaveProc();",

cEnable: "event.rc = (event.target != null);",
nPos: 7
});

 

But now with the New Adobe Reader I can't see the menu. I've change cParent: "File", to cParent: "Menu", but no result.

So how can you a menu item in the New version of Adobe Reader.

 

Thx

Thom Parker
Community Expert
Community Expert
March 14, 2024

The top menu in the new UI is "AV2::HamburgerMenu". Some of the old top menus are still there, such as View, Window, and Help, but there's no "File" menu. 

 

I'd suggest reverting to the old UI.

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Legend
May 21, 2020

Adobe don't announce anything in advance. They haven't said anything about things going away, nor promised that they will not.  Personally, I'd use a plug-in because I'm a C++ programmer used to writing plug-ins. But to write a plug-in for Reader will cost you plenty. So JavaScript may be better for you.

SyamalaAuthor
Known Participant
May 21, 2020

Thank you very much for all the support you gave for a new bee like me. Much appreciated 🙏