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

How to invoke acrobat plugin function from external application?

New Here ,
Jan 16, 2017 Jan 16, 2017

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!

TOPICS
Acrobat SDK and JavaScript
452
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 ,
Jan 16, 2017 Jan 16, 2017

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.

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 16, 2017 Jan 16, 2017
LATEST

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.

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