Tuesday, March 30, 2010

Event generation from Javascript

Is there any way to create an ''event'' fired by a folder-level Javascript file that can be trapped by an Acrobat plugin and/or an application?

In particular, I need an event that indicates that the annotation download has completed via SOAP collaboration (i.e. a folder level script based on sdkSOAPCollabSample.js).

Is there any possibility that Adobe will implement such an event in a future Acrobat version?

Bill

Event generation from Javascript

Yes, one can, but the syntax will be dependent upon what language your plugin is coded in. You might want to ask this question in the Acrobat SDK forum.

http://forums.adobe.com/community/acrobat/acrobat_sdk

And you should download the Acrobat SDK and other documentation from Adobe's Acrobat Developers community.

http://www.adobe.com/devnet/acrobat/

Event generation from Javascript

Thanks for your reply.

My plugin is written in C++ for the Windows platform.?I'll do as you suggest and post my question in the Acrobat SDK forum.

In looking through the Javascript documentation, I can't find any reference to the creation of custom events.?For example, the Event and EventListener objects seem to be restricted to multimedia events.?The setAction() method is only used for WillClose, WillSave, DidSave, WillPrint, and DidPrint events.?What I need is the ability to create and fire an event at a certain point in my folder-level js file, specifically, at the end of the this.enumerate() function, after all of the annotations have been downloaded so that my plugin can trap the ''download compete'' event and then, for example, make the Comment %26amp; Markup toolbar appear.

Please let me know which js method(s) I should look at.

Thanks,

Bill

No comments:

Post a Comment