Highlighted

how to check if we are in Acrobat Pro DC or Acrobat Reader DC from java script.

Community Beginner ,
Jun 13, 2020

Copy link to clipboard

Copied

I have written "User"  Specific Folder level script. I placed it in 

"~/Library/Application Support/Adobe/Acrobat/DC/JavaScripts"

It is getting loaded both in  Acrobat Pro DC and Acrobat Reader DC . How can i differentiate both from inside JavaScript.

 

I tried checking plugin names by using 

app.plugIns.toString()

 

Is there any other efficient way to do this . 

Topics

Mac, PDF forms, View PDF

Views

108

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

how to check if we are in Acrobat Pro DC or Acrobat Reader DC from java script.

Community Beginner ,
Jun 13, 2020

Copy link to clipboard

Copied

I have written "User"  Specific Folder level script. I placed it in 

"~/Library/Application Support/Adobe/Acrobat/DC/JavaScripts"

It is getting loaded both in  Acrobat Pro DC and Acrobat Reader DC . How can i differentiate both from inside JavaScript.

 

I tried checking plugin names by using 

app.plugIns.toString()

 

Is there any other efficient way to do this . 

Topics

Mac, PDF forms, View PDF

Views

109

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
Adobe Community Professional ,
Jun 13, 2020

Copy link to clipboard

Copied

You can check app.viewerType;

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...
Adobe Community Professional ,
Jun 13, 2020

Copy link to clipboard

Copied

if (app.viewerType == "Reader") { // place your script here }

or

if (app.viewerType != "Reader") { // place your script here }

 

See documentation:

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/Acro12_MasterBook/JS_API_AcroJS/ap...

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...
Resources
Trending Issue & Solution
Edit PDF in Adobe Acrobat Pro DC