Search code examples
pdfacrobat

how to get the name of the pdf reader by javascript


I would like to show a message to the user displaying the pdf reader name. Is there any pdf javascript that can show the reader name (eg: Adobe Acrobat or Nitro Pro)?


Solution

  • Not all pdf viewers support JavaScript and the ones that do, do so in varying degrees so this won't work in all applications but...

    app.alert(app.viewerType+" "+app.viewerVersion);
    

    ... is intended to show which viewer application and version is running. In Adobe tools, the return values will be "Reader", "Exchange", "or "Exchange-Pro". "Exchange" was the original name of Acrobat so the last two are for Acrobat Standard and Acrobat Pro.