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

Adobe Reader plugin commandline variable

Explorer ,
Apr 25, 2016 Apr 25, 2016

Hello.

For work I am making an Adobe read pluging.

Is it possible to pass a textstring to the adobe reader executable and search for this text string with my own plugin and highlight these instances on the first pdf document page ?

My plugin requires a text string to highlight.

Can I pass the text string from an external application ?

TOPICS
Acrobat SDK and JavaScript
1.1K
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

correct answers 1 Correct answer

LEGEND , Apr 26, 2016 Apr 26, 2016

The plugin is loaded with Acrobat/Reader.  Plugins are not apps to be invoked, rather they are a collection of callbacks. you have an initialisation callback, which regusters the others. Don't think of Acrobat as being a command line with a file on it. Acrobat starts. At some point file(s) are opened. If you registered for suitable call backs (like PDDocDidOpen) your callbacks will be called. In any order, any number of times. You can register an Idle procedure too, which gets a callback when Ac

...
Translate
LEGEND ,
Apr 25, 2016 Apr 25, 2016

I don't think there is any possibility with the command line. You can invent your own way to communicate with your plug-in if you are careful with these rules.

1. A plug-in cannot stop and wait for events in the main thread without blocking the app.

2. A plug-in can create new threads but must not use any Acrobat API whatsoever in these new threads.

The very simplest approach would be to create a file in a known location which the plug-in looks for. Be sure to identify the target file, as your plug-in may be called for other PDFs, including invisible PDFs used internally, and PDFs shown in external windows. Subject to the above restrictions you can create COM servers or other kinds of IAC.

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
Explorer ,
Apr 25, 2016 Apr 25, 2016

Thank you,

Is there also a way, that my plug-in starts automatically when Reader starts ?

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 ,
Apr 25, 2016 Apr 25, 2016

The plug-in will loaded with the start of Reader.

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
Explorer ,
Apr 25, 2016 Apr 25, 2016

I know, but can it do something automatically from start, without invoking it ?

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 ,
Apr 26, 2016 Apr 26, 2016
LATEST

In the plug-in initialization you can e.g. add or remove menus and menu items.

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 ,
Apr 26, 2016 Apr 26, 2016

The plugin is loaded with Acrobat/Reader.  Plugins are not apps to be invoked, rather they are a collection of callbacks. you have an initialisation callback, which regusters the others. Don't think of Acrobat as being a command line with a file on it. Acrobat starts. At some point file(s) are opened. If you registered for suitable call backs (like PDDocDidOpen) your callbacks will be called. In any order, any number of times. You can register an Idle procedure too, which gets a callback when Acrobat is idle.

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