• 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 check if we are in Acrobat Pro DC or Acrobat Reader DC from java script.

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

648

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

Copy link to clipboard

Copied

You can check app.viewerType;

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

Copy link to clipboard

Copied

LATEST

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...

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