Link to home
Start Free TrialLog in
Avatar of acnguyen
acnguyen

asked on

Detecting Adobe Reader

How can you detect if a client pc has the Adobe Acrobat Reader plug-in installed when they click on a link to a PDF file?  
Avatar of robbert
robbert

The only way of checking is JavaScript under Netscape.

----------------------------------------

<script language=javascript>
function isPlugin(strPluginName) {
    for (i = 0; i < navigator.plugins.length; i++) {
        if (navigator.plugins[i].name == strPluginName) return true
    }
    return false
}
document.write(isPlugin("Adobe Acrobat"))
</script>

----------------------------------------

IE has the navigator.plugins object, too, but it is committed not to return any value.

In ASP, one would be expecting to find plugins in the Request.ServerVariables collection (only), but there isn't.
ASKER CERTIFIED SOLUTION
Avatar of robbert
robbert

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
Avatar of acnguyen

ASKER

Comment accepted as answer
C grade. Do you think, there could be an additional answer? I spent 30 minutes on that.
Thanks, though.
And, there was no additional comment, since the others accepted my comment as perfect.
I have to assume that even most experienced coders had reviewed your question.
mgfranz, Marine, clockwatcher, mberumen, at least.