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

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

Community Beginner ,
May 21, 2020 May 21, 2020

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

TOPICS
Mac
1.5K
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
LEGEND ,
May 21, 2020 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.

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, 2020 May 21, 2020

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

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 ,
Jun 02, 2020 Jun 02, 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

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
New Here ,
Mar 14, 2024 Mar 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

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 ,
Mar 14, 2024 Mar 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
Mar 14, 2024 Mar 14, 2024

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?

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 ,
Mar 18, 2024 Mar 18, 2024
LATEST

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.  

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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