Link to home
Start Free TrialLog in
Avatar of abunectar
abunectar

asked on

How to install adobe in client machine through asp application

hi iam abu
                    iam using asp and sql server.i my project i want to view some documents in acrobat reader.so if the enduser doesnt have acrobat reader i should give him a link to my sever path where i have acrobat exe .And on clicking the link acrobat reader must be installed in the client machine.so how to  do this.plz give some source code if u have
Avatar of sajuks
sajuks

not easily done, there are a few options.

1> requires the client to agree to say yes to activex run

<SCRIPT LANGUAGE="Javascript">
<!--
//Credit to DeCojutepeque
// detection for Netscape
var useAcrobat = navigator.mimeTypes &&
navigator.mimeTypes["application/pdf"]
//-->
</SCRIPT>
...
<SCRIPT LANGUAGE="VBScript">
<!--
   on error resume next
   useAcrobat = not IsNull(CreateObject("AcroExch.Document"))
   '                can be CreateObject("PDF.PdfCtrl.1") too!
//-->
</SCRIPT>

<SCRIPT>
<!--
   if (useAcrobat)
      document.write("Acrobat reader ok");
   else
      document.write("Acrobat reader not found");
//-->
</SCRIPT>

if acrobat reader is found thgen you dont've to worry.

2.Best and preferred option,
On your webpage give the link to download the acrobat setup and state explicitly that it needs
adobe to be installed.
abunectar are you still stuck at the previous question that you'd posted ?
Would be a nice idea to clean up all old posts.. makes the other experts happier :-)
(i being one of them )
Avatar of abunectar

ASKER

sajuks i have accepted ur previous answer.but iam stuck up since u have given me partial o/p.any way ur code for acrobat reader is not working.see my project is intranet project.as u say i can give link to the user.but net cannot be available to all user.so i will be having the exe in the server.and if any one click the link a message has to be prompted whether to download or not.if yes it has to be downloaded from the server
My first option will work then. Have you incroporated taht idea?
sajuks
            iam having acrobat installed in my sytem.and when i execute ur code i says that acrobat is not found .
did you check for both ?
 useAcrobat = not IsNull(CreateObject("AcroExch.Document"))
or
 useAcrobat = not IsNull(CreateObject("PDF.PdfCtrl.1") )
Whcih version are you using for acrobat ? i tested in two m/cs one having full acrobat installed ( 6) and the other having
adobe reader (6) both places its working
i am having acrobat reader which i downloaded from the net.only the exe.i  un installed the previous version which i had in my system and i checked with ur code.i just showed a message acrobat not found.and i didnt even prompt me to install.then i installed the exe.after that also it is prmopting me that abobe is not found.
can u post your code. also whats your operating system ?i dont 've access to windows 98 so 'vnt checked in that.
i have win2000 os . i just pasted ur  first code in html and checked in preview.it is always showing that adobe is not found
i've checked my code in four different w2k server,2 w2k prof and one winxp m/c. Its working in all.
All machines have got ie6 sp1 and above,. also tested in firefox .
They all show working. have you copied my code as it is or 've you done any changes.
save the code as an html page and then view it. What tool are you using for preview ?
iam using front page for previewing.
i copied this code
<SCRIPT LANGUAGE="Javascript">
<!--
//Credit to DeCojutepeque
// detection for Netscape
var useAcrobat = navigator.mimeTypes &&
navigator.mimeTypes["application/pdf"]
//-->
</SCRIPT>
...
<SCRIPT LANGUAGE="VBScript">
<!--
   on error resume next
   useAcrobat = not IsNull(CreateObject("AcroExch.Document"))
   '                can be CreateObject("PDF.PdfCtrl.1") too!
//-->
</SCRIPT>

<SCRIPT>
<!--
   if (useAcrobat)
      document.write("Acrobat reader ok");
   else
      document.write("Acrobat reader not found");
//-->
</SCRIPT>
i didnt do any changes.iam having acrobat in my syetem.but it is prompting that acrobat is not found.pl review the code once again
thanks
abu
checked in frontpage -2003 still working :-(
go to run > regedit.
do a find for AcroExch.Document
check or the data , uncheck the other two (keys and values)
forget the above, go to
regedit > HKEY_LOCAL_MACHINE\Software\CLASSES\.pdf
What is the default value that you see ?
registry vslues
name -(default)
type-reg_sz
data-(value not set)
Havent you associated acrobat with pdf files ? Did you try opening pdf files and see if it opens in pdf ?

try this,
for default set the data as AcroExch.Document
add a string value of Content Type with data as application/pdf.
See if that works
sajuks after giving the value it works.but how can i ask the client to edit the registry.
I wonder whether the problem was a error in installation in your machine.Can you check this in some other machine?
As i said I tried over here and its working fine.
Thats the only option available to you if you wasnt to check client side as far as i know. The other option being optn no 2
which i'd stated in my first post, trust the user ;-)
Chec kthe scripts at http://www.dithered.com/javascript/acrobat.html.
More precise and better . That should work for all cases
sajuks ur code is only working in the server and it is not working in client machine.i checked it.
ASKER CERTIFIED SOLUTION
Avatar of sajuks
sajuks

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