Skip to main content
Participating Frequently
Apr 8, 2020 8:52 AM UTC
Answered

Create Top/Parent Menu item in Adobe Pdf

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 is closed to new replies. Start a new post to keep the conversation going.

14 replies

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
Apr 8, 2020 9:06 AM UTC
amitnitbAuthor
Participating Frequently
Apr 15, 2020 9:40 AM UTC

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

Translate
Legend
Apr 15, 2020 10:15 AM UTC

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

Translate