2 Replies Latest reply on Dec 7, 2010 3:52 PM by RainbowChunChunChang

    How to open pdfs in javascript?

    deepak venkatachalam

      Hi friends,

       

      I am using the following code to open two pdfs through javascript, but the pdfs are not opening up.

       

      Plz help me out.

       

      var

       

       

      AccroApp = new ActiveXObject('AcroExch.App');

      AccroApp.Show();

       

      var newpd = new ActiveXObject('AcroExch.PDDoc');

       

      var newav = new ActiveXObject('AcroExch.AVDoc');

       

      var ok = newpd.Open("C:\Deepak\TED Pdfs\f1t801_.pdf");

       

      if (ok) {

      newav = newpd.OpenAVDoc(

      "C:\Deepak\TED Pdfs\f1t801_.pdf");

      }

       

      var oldpd = new ActiveXObject('AcroExch.PDDoc');

       

      var oldav = new ActiveXObject('AcroExch.AVDoc');

       

      ok = oldpd.Open("C:\Deepak\TED Pdfs\f1t802_.pdf");

       

      if (ok) {

      oldav = oldpd.OpenAVDoc(

      "C:\Deepak\TED Pdfs\f1t802_.pdf");

      }

       

      Regards

       

      Deepak.