View Single Post
 
Old December 1st, 2005, 08:26 AM
crmpicco crmpicco is offline
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default AcroPDF.PDF.1 object for detecting Acrobat Reader

Code:
else if (window.ActiveXObject)
{
    for (x=2; x<10; x++)
    {
        // To Detect older Acrobat Versions 6 -
        try
        {
            oAcro=eval("new ActiveXObject('PDF.PdfCtrl."+x+"');");
            if (oAcro)
            {
                acrobat.installed=true;
                acrobat.version=x+'.0';
            }
        }
        catch(e) {}
    }

    // To Detect older Acrobat Versions 6 -
    try
    {
        oAcro4=new ActiveXObject('PDF.PdfCtrl.1');
        if (oAcro4)
        {
            acrobat.installed=true;
            acrobat.version='4.0';
        }
    }
    catch(e) {}

    // To Detect Acrobat Version 7 +
    try
    {
        bAcrobatVer7 = new ActiveXObject("AcroPDF.PDF.1");
        if (bAcrobatVer7)
        {
            acrobat.installed=true;
            acrobat.version="7.0";
        }
    }
    catch(e) {}
}
I have this code to detect if Acrobat is installed - from version 7 the Object has changed to AcroPDF.PDF.1, does anyone know if that will change with V8? V7.5? Also, do the code above cover V3-V7?

TIA.

Picco

www.crmpicco.co.uk
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk