Is there any jquery plugin/script to detect Adobe Reader on user system?
Asked Answered
S

7

2

Is there any jquery plugin/script to detect Adobe Reader on user system ? and it is not then show a message to download.

Code should be compatible with all A-grade browsers.

alt text http://easycaptures.com/fs/uploaded/448/6837085829.png

Site answered 14/12, 2009 at 11:6 Comment(0)
R
3

Googling turns up this:

jQuery browser plugin detection

Rosalindarosalinde answered 14/12, 2009 at 11:10 Comment(4)
oh i tried this on same system with 2 browsers FF is showing PDF: yes and IE7 showing PDF:NoSite
I get this too, but legitimately (There is a PDF plugin installed in FF but not in IE). Are you sure IE has the plugin installed?Rosalindarosalinde
I heard about only Flash plugin. Do we install a pluging for PDF in IE ?Site
yes i checked mine PDF was disabled in Tools > Manage Addo-nsSite
B
4

Don't stress about which plugin they're using. Just check for support for the 'application/pdf' MIME type, and let the browser take care of the rest.

if ("application/pdf" in navigator.mimeTypes) { // ... do work }

The only reason I'd want to test for Adobe Reader is to detect outdated & broken versions, so I can prompt the user to upgrade. Old versions tend to complain that PDFs are broken when they're just a newer, unsupported PDF format or use features that viewer doesn't understand. Few users understand what's doing the PDF viewing and would never think to update Adobe Reader if they have problems, so it's a good idea to help them out.

If you don't detect Adobe Reader, just check for the MIME type and go ahead. That way you won't break FoxIt, Chrome's native PDF viewing, Safari's native PDF viewing, etc.

Brumaire answered 13/4, 2011 at 2:21 Comment(0)
R
3

Googling turns up this:

jQuery browser plugin detection

Rosalindarosalinde answered 14/12, 2009 at 11:10 Comment(4)
oh i tried this on same system with 2 browsers FF is showing PDF: yes and IE7 showing PDF:NoSite
I get this too, but legitimately (There is a PDF plugin installed in FF but not in IE). Are you sure IE has the plugin installed?Rosalindarosalinde
I heard about only Flash plugin. Do we install a pluging for PDF in IE ?Site
yes i checked mine PDF was disabled in Tools > Manage Addo-nsSite
B
2

I found this Generic PDF Reader detector solution to be the most comprehensive.

  • Covers all the A-list browsers (and many others)
  • Handles cases with built-in pdf readers (e.g. Mac Safari, Chrome).
  • It uses ActiveX to test IE (which doesn't support navigator.MimeTypes correctly)
  • Well Documented (including scenarios which may not provide precise information)
  • Can report plugin version
  • Get a copy here

The same site also has other detectors for other types of plugins.

Bordy answered 19/5, 2011 at 18:14 Comment(0)
F
0

I'm not sure, but is the pdf not automaticly downloaded when Adobe or a similar plugin is not available?

Featurelength answered 14/12, 2009 at 11:11 Comment(0)
W
0

I don't have adobe reader, but I do have Foxit reader, which will take care of Acrobat documents. Therefore it's not a good idea to try to detect what the user has installed. Instead let the users system deal with it. If they have Adobe Reader, then it will deal with PDF files, if not, it will download and open in an app that can deal with it. If you want to help a user, add a discreet link to download Adobe Reader next to the link to the file their downloading.

Witchery answered 14/12, 2009 at 11:14 Comment(0)
K
0

Don't do this. Some users (like me) prefer to just download the PDF and not let it display in browser (through adobe readers browser plugin).

Then, there is no way to detect if the user has any program to display PDF files installed. Systems vary wildly (e.g. on Mac OS X you do not need Adobe Reader, there the "Viewer" application can display PDF files).

Kinson answered 14/12, 2009 at 11:20 Comment(0)
A
0

To detect using Javascript if Adobe Reader plugin is installed in a browser, go to Detect Adobe Acrobat Plugin for full downloadable code. The script detects IF and which version of acrobat is installed, as well as the browser type

Arid answered 21/1, 2011 at 1:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.