Link to home
Start Free TrialLog in
Avatar of SherylSt
SherylSt

asked on

Download of Adobe Acrobat Reader

We're putting some pdf file links in our webpage. Opening the PDF file is ok for those who have Adobe Acrobat Reader installed. But when a user, does not have it, they wanted to be prompted to install the reader.

Can anyone please show me an example on how to detect of Adobe Acrobat Reader is installed in a client machine? And if not, direct them to install Adobe Acrobat Reader?

Please help.  Thanks!
Avatar of hongjun
hongjun
Flag of Singapore image

Avatar of thunderchicken
thunderchicken

It's not an easy thing to do, but here's a link how to do it in javascript

http://www.faqts.com/knowledge_base/view.phtml/aid/7513/fid/125
Avatar of SherylSt

ASKER

We're using IE... IS ther an example for IE please... Thanks.
I ran into this a while back but never got to test it:

<SCRIPT LANGUAGE="Javascript">
<!--
// detection for Netscape
var useAcrobat = navigator.mimeTypes &&
navigator.mimeTypes["application/pdf"]
//-->
</SCRIPT>
...
<SCRIPT LANGUAGE="VBScript">
<!--
   on error resume next
   useAcrobat = not IsNull(CreateObject("AcroExch.Document"))
   '                can be CreateObject("PDF.PdfCtrl.1") too!
//-->
</SCRIPT>

<SCRIPT>
<!--
   if (useAcrobat)
      document.write("Acrobat reader ok");
   else
      document.write("Acrobat reader not found");
//-->
</SCRIPT>
ASKER CERTIFIED SOLUTION
Avatar of DeCojutepeque
DeCojutepeque

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, DeCojutepeque...

I tried your code, it gave me blank page after running the script...
i tried it again... it worked this time.. i mean it returned a 'Acrobat reader not found'.
BUT I already intalled Acrobat reader in my machine.. why is it not detecting it?
please help...
useAcrobat = not IsNull(CreateObject("AcroExch.Document"))
   '                can be CreateObject("PDF.PdfCtrl.1") too!

is working for me just i have to iterate through 1 to 6 beacuse it will create object for particular version of acrobate and to check for version 1 to 6 i am iterating through 1 to 6 and its works.
for acrobate reader 6 its return true for PDF.pdfCtrl.6
for acrobate reader 5 its return true for PDF.pdfCtrl.5
Thanks Decojutepeque
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Accept: DeCojutepeque {http:#9882972}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

fozylet
EE Cleanup Volunteer