2 Replies Latest reply on Aug 14, 2009 10:09 AM by wildcathoya

    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?



        • 1. Re: Event generation from Javascript
          gkaiseril MVP & Adobe Community Professional

          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.




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



          1 person found this helpful
          • 2. Re: Event generation from Javascript
            wildcathoya Level 1

            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 & Markup toolbar appear.


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