I have a need to use Adobe Reader version 5.x in my web application. I want to know if anyone knows how to launch the correct version of acrobat (assuming they are installed). Let me describe what I have learned about activeX on IE.
In Netscape there is a property on the document that stores all the plugins registered to the browser. This means that with Netscape all one has to do is load the correct version of the adobe reader (5.0).
In IE the plugins are ActiveX controls (IE is one too). There is no property or method that will list all the controls easily. I say easily, because using jscript you can trick the browser into telling you if the control is registered. The following JS will check to see what version of adobe you are running.
Now I found that Adobe versions 5/6 uses the following clsid key CA8A9780-280D-11CF-A24D-444553540000.
This means that I can now use the <OBJECT> tags to load this activex control from the browser window.
By including this code into the web page.
This is fine if you don't care which version of reader you get, but I do. I need version 5.0. It seems that if you use the above method you get the ocx (activex) app that is registered (in the client's registry) as the default one.
Does anyone have any ideas on how to proceed? Is there a class that deals with the client objects direct from the server?
In Netscape there is a property on the document that stores all the plugins registered to the browser. This means that with Netscape all one has to do is load the correct version of the adobe reader (5.0).
In IE the plugins are ActiveX controls (IE is one too). There is no property or method that will list all the controls easily. I say easily, because using jscript you can trick the browser into telling you if the control is registered. The following JS will check to see what version of adobe you are running.
Code:
var m='';
var g=0;
if (window.ActiveXObject)
{
for (x=2; x<10; x++)
{
try
{
oAcro = eval("new ActiveXObject('PDF.PdfCtrl."+x+"');");
if (oAcro)
{
m + = g +") PDF.PdfCtrl."+x+" \n" ;
g++;
}
}
catch (e){}
}//End for loop
alert("The following versions of Adobe are on you machine:\n"+m);
}
Now I found that Adobe versions 5/6 uses the following clsid key CA8A9780-280D-11CF-A24D-444553540000.
This means that I can now use the <OBJECT> tags to load this activex control from the browser window.
By including this code into the web page.
Code:
<object id="test" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000>
If you see this Acrobat Reader Failed to Load
</object>
This is fine if you don't care which version of reader you get, but I do. I need version 5.0. It seems that if you use the above method you get the ocx (activex) app that is registered (in the client's registry) as the default one.
Does anyone have any ideas on how to proceed? Is there a class that deals with the client objects direct from the server?