What is the preferred way of adding a menu to adobe Reader C++ Plugin or JavaScript plugins ?
Copy link to clipboard
Copied
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_Us... when to use what, I can achieve it using both plugin and javascript. Which one is best
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you very much for all the support you gave for a new bee like me. Much appreciated 🙏
Copy link to clipboard
Copied
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. .
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Can you add new items under the top-level "Hamburger" menu, if you specify that string as the cParent parameter of addMenuItem? Can you add sub-menus to it, using addSubMenu?
Copy link to clipboard
Copied
Don't think so. I haven't explored adding menus enough to have firgured out the details, but there's some level of protection on the top level and some of the other menus that blocks adding sub menus. Could be related to protected mode.
Use the Acrobat JavaScript Reference early and often

