Skip to main content
April 13, 2016
Question

Try to open Adobe Acrobat via OLE inside a Java(SWT)-Application

  • April 13, 2016
  • 1 reply
  • 2188 views

I would like to open a PDF File inside an existing Java(SWT)-Application. The PDF should not opened in an external frame. I tried via the OLE interface but without success.

clientSite = new OleControlSite(frame, SWT.NONE, "AcroExch.App", fileName);
automation
= new OleAutomation(clientSite);
clientSite
.doVerb(OLE.OLEIVERB_OPEN);



At the moment i get an exception like: Failed to create Ole Client. result = -2147221164

This topic has been closed for replies.

1 reply

ReinhardF
Participating Frequently
April 16, 2016

Hi,

I don't know JAVA but you could use the IE Interface and then navigate to the PDF file.

Pseudocode:

$Obj = ObjCreate("Shell.Explorer.2")

$Obj.Navigate('D:\Test.pdf')

HTH, Reinhard

April 28, 2016

Thanks, but i need a solution without using the IE

Legend
April 28, 2016

Let's just check the basics. Do you have Acrobat PRO installed? What version?