Copy link to clipboard
Copied
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 ?
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
...Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you,
Is there also a way, that my plug-in starts automatically when Reader starts ?
Copy link to clipboard
Copied
The plug-in will loaded with the start of Reader.
Copy link to clipboard
Copied
I know, but can it do something automatically from start, without invoking it ?
Copy link to clipboard
Copied
In the plug-in initialization you can e.g. add or remove menus and menu items.
Copy link to clipboard
Copied
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.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now