Copy link to clipboard
Copied
Hello,
After lot of trial and errors, now I am able to create a plugin to create a highlight annotation, get annotation, delete the annotation etc.
Now, I want to do this DYNAMICALLY.
What I mean is that, there will be our Windows desktop application which tries to communicate to the Acrobat using this plugin.
So, Is there any way to communicate to acrobat plugin from external program?
Is there any such kind event driven mechanism available in Acrobat SDK?
What will be the possible solutions for this? I want to skip IAC in between because I want to make the solution very optimal.
Thank you in advance!
Copy link to clipboard
Copied
You will have to create your own communications mechanism in your plug-in. There is nothing built into the plug-in API that would facilitate such a communications channel between your external application and the plug-in. You can use whatever mechanisms are provided and supported by your operating system.
This can be something really simple like a configuration file approach, for which you would register a new file format (using a specific file extension) with Acrobat and then handle the reading and processing of such a configuration file in your plugin (e.g. open file "abc.pdf" - apply steps A, B and C), or it can be a full blown COM server on Windows. On a Mac, I might use named pipes or sockets.
Keep in mind for anything you do that only the main thread in your plug-in can communicate with Acrobat via the plug-in API, if you create more threads to communicate with your external application, you will have to provide a communications mechanism between your threads.
Copy link to clipboard
Copied
Two things to bear in mind.
1. your plugin may have multiple threads but it is vital to use all Acrobat API functions only in the main thread.
2. If your plugin waits (for a COM connection for example) in the main thread Acrobat will hang.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now