1 2 Previous Next 52 Replies Latest reply on Jul 7, 2013 5:37 AM by rombanks

    Question to Adobe: Ruling out non-Adobe viewers via Acrobat Javascript

    rombanks Level 1



      ***I would like to address this question to Adobe Acrobat developers:****


      I'd like to add a doc-level javascript (thru another script) that will check the viewer type, and if it neither Acrobat (6 and higher) nor Reader, the document will close.


      So I wrote:



      this.addScript("CheckViewer", "var viewer = app.viewerType;\
           if ((viewer !== \"Exchange-Pro\") && (viewer !==\"Reader\"))\
           {app.alert(\"This Document Requires Adobe Reader or Acrobat Version 10 or Later.\");\


      The script is correctly placed in the document, BUT if I open the document in Foxit Reader, for example, nothing happens just because Foxit disguises itself as "Reader". Is there a way to overcome this problem?


      I think, the best way would be to change the Acrobat Javascript API so that  app.viewerType values will be: Adobe_Exchange-Pro, Adobe_Exchange, and Adobe_Reader.


      I would appreciate your advice!

        1 2 Previous Next