Skip to main content
Known Participant
June 13, 2020
Question

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

  • June 13, 2020
  • 2 replies
  • 879 views

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 . 

This topic has been closed for replies.

2 replies

JR Boulay
Community Expert
Community Expert
June 13, 2020

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/app_properties.htm?rhhlterm=viewerType&rhsyns=%20#XREF_39047_viewerType

Acrobate du PDF, InDesigner et Photoshopographe
Bernd Alheit
Community Expert
Community Expert
June 13, 2020

You can check app.viewerType;