2 Replies Latest reply on Jul 6, 2010 12:01 AM by Paul_Kuhn

    Embed Adobe Reader with OLE into Java client

    Paul_Kuhn Level 1

      Hi all,


      I am trying to integrate Adobe Reader 9.3 using OLE into an Eclipse base Java client using SWT.

      However the basic initialization of the OLE Control fails with this error:


      Unable to open type library for AcroPDF.PDF.1
      org.eclipse.swt.SWTException: Failed to create Ole Client. result = -2147221164
          at org.eclipse.swt.ole.win32.OLE.error(OLE.java:302)
          at org.eclipse.swt.ole.win32.OleControlSite.<init>(OleControlSite.java:142)



      Here is the code I used:


      String progID = "AcroPDF.PDF.1";

      Shell shell = new Shell();


      OleFrame frame = new OleFrame(shell, SWT.NONE);
      OleControlSite site = null;
      OleAutomation auto = null;


      try {
          site = new OleControlSite(frame, SWT.NONE, progID);
          auto = new OleAutomation(site);
      } catch (SWTException e) {

              System.err.println("Unable to open type library for " + progID);



      I can see the key "AcroPDF.PDF.1" in my registry...


      Does anybody know what I am missing here?