Solved

How to install adobe in client machine through asp application

Posted on 2004-10-31
281 Views
Last Modified: 2013-12-16
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
0
Question by:abunectar
    22 Comments
     
    LVL 33

    Expert Comment

    by: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.
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    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 )
    0
     
    LVL 1

    Author Comment

    by:abunectar
    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
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    My first option will work then. Have you incroporated taht idea?
    0
     
    LVL 1

    Author Comment

    by:abunectar
    sajuks
                iam having acrobat installed in my sytem.and when i execute ur code i says that acrobat is not found .
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    did you check for both ?
     useAcrobat = not IsNull(CreateObject("AcroExch.Document"))
    or
     useAcrobat = not IsNull(CreateObject("PDF.PdfCtrl.1") )
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    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
    0
     
    LVL 1

    Author Comment

    by:abunectar
    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.
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    can u post your code. also whats your operating system ?i dont 've access to windows 98 so 'vnt checked in that.
    0
     
    LVL 1

    Author Comment

    by:abunectar
    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
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    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.
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    save the code as an html page and then view it. What tool are you using for preview ?
    0
     
    LVL 1

    Author Comment

    by:abunectar
    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
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    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)
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    forget the above, go to
    regedit > HKEY_LOCAL_MACHINE\Software\CLASSES\.pdf
    What is the default value that you see ?
    0
     
    LVL 1

    Author Comment

    by:abunectar
    registry vslues
    name -(default)
    type-reg_sz
    data-(value not set)
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    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
    0
     
    LVL 1

    Author Comment

    by:abunectar
    sajuks after giving the value it works.but how can i ask the client to edit the registry.
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    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 ;-)
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    Chec kthe scripts at http://www.dithered.com/javascript/acrobat.html.
    More precise and better . That should work for all cases
    0
     
    LVL 1

    Author Comment

    by:abunectar
    sajuks ur code is only working in the server and it is not working in client machine.i checked it.
    0
     
    LVL 33

    Accepted Solution

    by:
    check http://www.dithered.com/javascript/acrobat.html , that  should be the ideal one.
    forget the above script.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Lean Six Sigma Project Manager Certification

    There are many schools of thought around successful project management, but few as highly regarded as the Six Sigma and Lean methods. With 37 hours of learning, this training will explain concrete processes for increasing efficiency and limiting wasted time and effort.

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
    The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

    931 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now