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

How to listen for document open in acrobat

New Here ,
Jan 04, 2021 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

497

Translate

Translate

Report

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 04, 2021 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.

Votes

Translate

Translate

Report

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
New Here ,
Jan 04, 2021 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.

Votes

Translate

Translate

Report

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 05, 2021 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...

Votes

Translate

Translate

Report

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
New Here ,
Jan 07, 2021 Jan 07, 2021

Copy link to clipboard

Copied

LATEST

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.

 

 

 

 

Votes

Translate

Translate

Report

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 05, 2021 Jan 05, 2021

Copy link to clipboard

Copied

Where does you this script?

Votes

Translate

Translate

Report

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