Yo dispongo de dos formas las cuales sirven según el navegador...
Javascript
:
Código HTML:
<script language="javascript" type="text/javascript">
<!--
function pluginVer(desc, t) {
var ndx=0;
var s = "";
if (navigator.plugins) {
cnt = navigator.plugins.length;
if (cnt > 0) {
for (ndx = 0; ndx < cnt; ndx++) {
if ((navigator.plugins[ndx].description.indexOf(desc) != -1) || (navigator.plugins[ndx].name.indexOf(desc) != -1)) {
if (t == 1)
rg = /([0-9][^\s]*)/;
else
rg = /([0-9].*)/;
a = rg.exec(navigator.plugins[ndx].description);
if (a) s = a[0]; else {a = rg.exec(navigator.plugins[ndx].name); if (a) s = a[0];}
if (s != '') break;
}
}
}
}
return escape(s);
}
//Para detectar la version de Acrobat (con lo cual sabremos si dispone o no de el) hay q llamar a la función de esta forma:
pluginVer('Acrobat', 1);
//-->
</script>
VBScript
:
Código HTML:
<script language="vbscript">
//For test purpose only
<!--
Function isHere(chk)
isHere = -1
On error resume next
If ScriptEngineMajorVersion > 1 then
flp = IsObject(CreateObject(chk))
if flp then
isHere = 1
Else
isHere = 0
End if
End if
End Function
// -->
<!--
Function getAcroVer()
getAcroVer = ""
On error resume next
If ScriptEngineMajorVersion > 1 then
if isHere("pdf.PdfCtrl.6") OR isHere("GBDetect.Detect.1") then
getAcroVer = "6"
elseif isHere("pdf.PdfCtrl.5") then
getAcroVer = "5"
else
err.clear
set ab = CreateObject("Pdf.PdfCtrl.1")
If err.number = 0 then
ab.gotoFirstPage
If err.number = 438 then
getAcroVer = "3"
else
getAcroVer = "4"
end if
end if
end if
end if
End Function
//-->
</script>
No sé si es legal postear estas funciones pues pertenecen a una famosa página q las vende como producto. Yo sólo las cogí del código HTML y me las guardé, pero jamás las he compartido (hasta ahora) ni usado para fines comerciales.
Si deben borrar el post o debo eliminar el contenido notifíquenmelo por favor.
Saludos.