Javascript : document actions

Apr 14, 2020

Copy link to clipboard

Copied

how to add acrobat javascript to set document actions automatically.

I would like to add javascript to "document will save" action in document action menu of Acrobat automatically. 

Any guidance will be much appreciated.

 

 

Thank you,

Nivi

TOPICS
Acrobat SDK and JavaScript

Views

48

Likes

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

Javascript : document actions

Apr 14, 2020

Copy link to clipboard

Copied

how to add acrobat javascript to set document actions automatically.

I would like to add javascript to "document will save" action in document action menu of Acrobat automatically. 

Any guidance will be much appreciated.

 

 

Thank you,

Nivi

TOPICS
Acrobat SDK and JavaScript

Views

49

Likes

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
Apr 14, 2020 0
Most Valuable Participant ,
Apr 14, 2020

Copy link to clipboard

Copied

You can do it using the setAction method of the Document object, like this:

this.setAction("WillSave", "app.alert(\"The file has been saved.\",3);");

 

Note the second parameter includes the script to execute, but in the form of a String.

Likes

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
Reply
Loading...
Apr 14, 2020 1
Apr 22, 2020

Copy link to clipboard

Copied

Thank you very much

Likes

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
Reply
Loading...
Apr 22, 2020 0
Adobe Community Professional ,
Apr 14, 2020

Copy link to clipboard

Copied

When in doubt, check the reference:

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_API_Acro...

 

Likes

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
Reply
Loading...
Apr 14, 2020 1