I want to open PDF in my project using JACOB and print it, but there are some exceptions thrown. <code> wordCom = new ActiveXComponent("AcroPDF.PDF.1"); try { Dispatch pdfDocs = wordCom.getProperty("Documents").toDispatch(); pdfdDoc = Dispatch.invoke(pdfDocs, "Open", Dispatch.Method, new Object { filePath }, new int).toDispatch(); return true; } catch (Exception ex) { ex.printStackTrace(); } </code>
Log in to post a comment.
I want to open PDF in my project using JACOB and print it, but there are some exceptions thrown.
<code>
wordCom = new ActiveXComponent("AcroPDF.PDF.1");
try {
Dispatch pdfDocs = wordCom.getProperty("Documents").toDispatch();
pdfdDoc = Dispatch.invoke(pdfDocs, "Open", Dispatch.Method,
new Object { filePath }, new int).toDispatch();
return true;
} catch (Exception ex) {
ex.printStackTrace();
}
</code>