How to listen for document open in acrobat

New Here ,
Jan 04, 2021

Copy link to clipboard

Copied

Hi All,
I am trying to register document open event handler via javascript but I am unable to listen the event.
I am registering it by using SetAction method.

this.setAction("Open", docOpen);

 

But when I am opening the document, I am getting error message TypeError: this.setAction is not a function
I am trying this on Adobe Acrobat Reader DC. Please note that I am new to this. 

 

I found this https://community.adobe.com/t5/acrobat-sdk/listen-for-doc-open-event-from-folder-level-script/m-p/94... but the link given in there is not working. 

Any help will be appreciated.

Regards!

TOPICS
Acrobat SDK and JavaScript, Mac, Windows

Views

71

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Jan 04, 2021

Copy link to clipboard

Copied

That won't work because "this" refers to a specific document. Such an "event listener" has to work at the app-level, and has to exist in a folder-level script, monitoring the activeDocs array for new items. It's not a simple coding task at all.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Jan 04, 2021

Copy link to clipboard

Copied

Ok, so seems like scripting is not a good option for registering the events. Should I explore C/C++ plugins for registering event listener?

 

Can you please direct me to the instructions how to directly launch the Acrobat Reader DC from VS for debugging?

 

Thanks for your time and help.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Jan 05, 2021

Copy link to clipboard

Copied

To develop plug-ins you would need the paid-for Acrobat. Once you have developed and debugged them you can apply for a Reader plug-in license, fees are variable. If you get as far as building a plug-in, debug them by setting Acrobat as the executable, or connect to the Acrobat executable.

 

If you'd like to note what you are trying to achieve (why you want to know that documents are opened) we may be able to give more focussed advice, or dire warnings about traps...

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
leonaidas AUTHOR LATEST
New Here ,
Jan 07, 2021

Copy link to clipboard

Copied

Thanks for pointing me in right direction. Sorry I am bit late in reply. 

I am using Acrobat now and able to load my plugin there. I've successfully registered the open document event handler. 
I found this helpful link.

 

 

 

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 05, 2021

Copy link to clipboard

Copied

Where does you this script?

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more