tags:

views:

1433

answers:

3

Currently I am working on a web page which will tell user about certain configurations on client machine. Out of this there is also requirement of detecting if Adobe Reader is installed on client machine or not. I am using ASP.NET/C#.

I have looked the following url for the answer "http://stackoverflow.com/questions/969027/check-adobe-reader-is-installed-c" but the code look into the server registry entires where IIS is installed and not the client machine where browser is running.

Is it possible to detect if Adobe reader is installed on client machine and not the server which is hosting the website?

+1  A: 

This website has it figured out for IE, still looking how to do this in other browsers. Also have a look at this question, it's similar to yours.

Robert Massa
Great. I'll have a look into these links.
Leo
I have implemnted the solution described in "This website" link and it works fine. For other browsers I just checked if plugin is installed. I have tested this on latest versions of browsers and Adobe Reader installed. Here is what I am doingif (navigator.plugins["Adobe Acrobat"].name != "" || navigator.plugins["Adobe Acrobat"].name != null) { isInstalled = true; }
Leo
+1  A: 

pls, check the script below, it worked fine for me in IE, FireFox and Chrome

<html>
<body>
<script type="text/javascript">
var found = false;
var info = '';

try 
{    
    acrobat4 = new ActiveXObject('PDF.PdfCtrl.1');    
    if (acrobat4) 
    {      
     found = true;      
     info = 'v. 4.0';    
    }  
}  
catch (e) 
{
    //???
}

if (!found)
{
    try 
    {
     acrobat7 = new ActiveXObject('AcroPDF.PDF.1');
     if (acrobat7) 
     {
      found = true;
      info = 'v. 7+';
     }
    } 
    catch (e) 
    {
     //???
    }

    if (!found && navigator.plugins && navigator.plugins.length>0)
    {
     for (var i = 0; i<navigator.plugins.length; i++) 
     {          
      if (navigator.plugins[i].name.indexOf('Adobe Acrobat') > -1)
      {
       found = true; 
       info = navigator.plugins[i].description + ' (' + navigator.plugins[i].filename + ')';
       break;
      }
     }
    }
}

document.write("Acrobat Reader Installed : " + found);
document.write("<br />");
if (found) document.write("Info : " + info);
</script>
</body>
</html>

hope this helps, regards

serge_gubenko
This worked for me, both IE and FF
Vnuk
A: 

10x for the script. it works fine for me in Safari,chrome,firefox,opera and internet explorer

Alex Proca