Skip to main content
Participating Frequently
April 8, 2020
Answered

Create Top/Parent Menu item in Adobe Pdf

  • April 8, 2020
  • 1 reply
  • 2395 views

Hi Team,

I have came across Js method like addSubMenu, addMenuItem, but these all are meant for sublevel menu. I want to create a Top level or custom Parent Menu similar to File,Edit,View,Windows,Help. Please suggest how to accomplish this.

 

Thanks in Advance,

Amit

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
April 8, 2020
amitnitbAuthor
Participating Frequently
April 15, 2020

Hello,

Thanks for the quick response.

So as suggested by you i have created an .api file with content as below:

 

//Declare menu variables
AVMenubar Themenubar = NULL; AVMenu NewMenu = NULL;
AVMenuItem NewMenuCommand = NULL;
//Retrieve the menu bar in Adobe Reader or Acrobat
Themenubar = AVAppGetMenubar();
//Create a new menu
NewMenu = AVMenuNew("New Menu", "ADBE:NewMenu", gExtensionID); if (NewMenu == NULL)
{
AVAlertNote ("Unable to create the menu"); AVMenuRelease (NewMenu);
return ;
}

 

I have copied and pasted the file at C:\Program Files (x86)\Adobe\Acrobat 2015\Acrobat\plug_ins

While opening a pdf file the new Menu is not getting reflected. Kindly rectify me where i am wrong.

 

Thanks in Advance,

Amit

Legend
April 15, 2020

It sounds as if you have created a text file, called it API and expert this to work? If so, NO. Miles away. As a C++ programmer with the right development tools and patience you can add this code to a template plug-in. If you are not an experienced C++ programmer you have a long journey. Start here. https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FPlugins_Introduction%2FAbout_plug-ins.htm&rhsearch=sandbox&rhsyns=%20