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

Differentiate manual and programmatic menu item click event

New Here ,
Jan 30, 2017 Jan 30, 2017

Hello,

I have developed a acrobat plugin. Plugin adds a menu-item under Edit menu.

I am doing some operations on execution of this menu-item.

Now, I want to do these operations in two ways:

1. Do some operations on execution of the menu item. In this case, execution of this menu item will be done by a IAC program (Which works fine in my case)

2. Do some another operations on execution of the same menu item. In this case, execution of this menu item will be done MANUALLY (By user).

So, in the nutshell, execution of the menu item will be done in two ways, manually and programmatically.

So, How can I differentiate this behavior?

Thanks.

TOPICS
Acrobat SDK and JavaScript
538
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
Adobe Employee ,
Jan 30, 2017 Jan 30, 2017

There are two common ways to handle this:

1) Invisible menu item that the IAC app calls instead of the standard one

2) Use JavaScript bridge to have the external app set some variable that the plugin checks

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 ,
Jan 30, 2017 Jan 30, 2017

In the second case, what do you mean by JavaScript bridge?

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 ,
Jan 30, 2017 Jan 30, 2017

How can I make the menu item invisible?

I can't see option to make the menu item invisible.

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
Adobe Employee ,
Jan 31, 2017 Jan 31, 2017

There is a documented way to call Acrobat JavaScript from other applications – see the SDK documentation.

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 ,
Jan 31, 2017 Jan 31, 2017

How can I make the menu item invisible?

I can't see option to make the menu item invisible in the Acrobat plugin API

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 ,
Jan 31, 2017 Jan 31, 2017

Any updates on this please?

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 ,
Jan 31, 2017 Jan 31, 2017

There are not so very many AVMenuItem methods. You create a callback that Acrobat uses to test for visibility.

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 ,
Feb 01, 2017 Feb 01, 2017

What do you mean by "callback that Acrobat uses to test for visibility"?

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 ,
Feb 02, 2017 Feb 02, 2017
LATEST

Just read the AVMenuItem method names, it should be clear which method is used to tegister such a callback. There is no 'set visible' call.

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