These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Invoking submenu item of acrobat prof. using SDKI in plug-in

kishorbagul
Registered: Jan 16 2008
Posts: 5

I am new to the plug-in creation.

I want to write a plug-in that invokes the inbuilt OCR facility provided by the Acrobat professional. I am using Acrobat Professional 7. Here In the "Document" menu, there is a menu item "Recognize Text using OCR" which is a popup menu item and in that first submenu item is "Start".

This "Start" is the menu item I want to invoke.

I tried to get the menu item names by using app.listMenuItems() in the JavaScript editor, but it does not give me the result for this submenu item.

Any help will be appreciated.

Thanks in advance.
--
Kishor

My Product Information:
Acrobat Pro 7.0, Windows
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi kishorbagul,

First, my company has a Free tool that lists the Menu Items in a nice report format that is easier to use than the results returned in the JS editor. It is called the "Menu Item and Toolbar Report Generator" and it adds a custom toolbar to Acrobat to generate a report for all the Menu Item names or toolbar button names. I think this will make it easier for you to see these items. You can download it from this page-
http://www.windjack.com/products/freestuff.php


As you have found, the Menu Item names in the User Interface of Acrobat and the programmtic names used under the covers are not the same. However, they do follow the exact same order when you run the Menu Item report. So looking at the list of Menu Item names under "Document" you see the first item in the User Interface is "Attach a File" and if you follow the list down you will note that "Recognize Text Using OCR" in the UI corresponds with "Paper Capture" in the report list, and all of the sub-menus are under that category.

Hope that helps,

Dimitri
WindJack Solutions
www.windjack.com
kishorbagul
Registered: Jan 16 2008
Posts: 5
Thank you for the reply,

I think this application gives me the names that are returned by the JS Editor when we execute the app.execMenuItem("") command. But the problem is that I am using VC++ to develop the plug-in. And when I am using this name in the AVCommand creation and try to use it on the toolbar button click(which was added by my plug-in), at that time due to some problem the Acrobat crashes.

I think there is some thing which I don't know in these names returned by the JS Editor and the ones needed in AVCommand to execute the menu item command.

And in addition I also want to overcome the dialog which is displayed when invoking app.execMenuItem("Cpt::PagesCapture") . I want the action as All radio button is selected and OK button is clicked on this dialog. THAT IS I WANT THE OCR FUNCTION TO START DIRECTLY WHEN THE USER CLICKS THE BUTTON WITHOUT ANY QUERY FOR THE INPUT.