我想在现有的Java(SWT)-Application中打开PDF文件。 PDF不应在外部框架中打开。我尝试通过OLE接口但没有成功。
clientSite = new OleControlSite(frame, SWT.NONE, "AcroExch.App", fileName);
automation = new OleAutomation(clientSite);
clientSite.doVerb(OLE.OLEIVERB_OPEN);
答案 0 :(得分:0)
您可以使用IE界面,然后导航到PDF文件。
伪代码:
$Obj = ObjCreate("Shell.Explorer.2")
$Obj.Navigate('D:\Test.pdf')
或Reader Web界面
伪代码:
$oReader = ObjCreate("AcroPDF.PDF.1")
$oReader.Load("D:\Test.pdf")
如何将对象绑定到您可能在Java下提出的Java-GUI中 HTH,Reinhard
PS:“Shell.Explorer.2”选项最适合我。