jacob-1.18工具包.zip

上传者: 34346915 | 上传时间: 2023-09-07 19:15:09 | 文件大小: 947KB | 文件类型: ZIP
jacob-1.18 包含jacob-1.18-x64.dll jacob-1.18-x86.dll 亲测可用: 下面为转pdf使用方法 package com.pdf.doctopdf.pdf; import com.jacob.activeX.ActiveXComponent; import com.jacob.com.Dispatch; import com.jacob.com.Variant; import java.io.File; public class TestJacob { public static void main(String args[]) { ActiveXComponent app = null; String wordFile = "C:\\Users\\admin\\Desktop\\jar\\年会系统优化_20210820_V0.2.docx"; String pdfFile = "C:\\Users\\admin\\Desktop\\jar\\测试pdf.pdf"; System.out.println("开始转换..."); // 开始时间 long start = System.currentTimeMillis(); try { // 打开word app = new ActiveXComponent("Word.Application"); // 获得word中所有打开的文档 Dispatch documents = app.getProperty("Documents").toDispatch(); System.out.println("打开文件: " + wordFile); // 打开文档 Dispatch document = Dispatch.call(documents, "Open", wordFile, false, true).toDispatch(); // 如果文件存在的话,不会覆盖,会直接报错,所以我们需要判断文件是否存在 File target = new File(pdfFile); if (target.exists()) { target.delete(); } System.out.println("另存为: " + pdfFile); // 另存为,将文档报错为pdf,其中word保存为pdf的格式宏的值是17 Dispatch.call(document, "SaveAs", pdfFile, 17); // 关闭文档 Dispatch.call(document, "Close", false); // 结束时间 long end = System.currentTimeMillis(); System.out.println("转换成功,用时:" + (end - start) + "ms"); }catch(Exception e) { e.getMessage(); System.out.println("转换失败"+e.getMessage()); }finally { // 关闭office app.invoke("Quit", 0); } } }

文件下载

资源详情

[{"title":"( 184 个子文件 947KB ) jacob-1.18工具包.zip","children":[{"title":"stylesheet.css <span style='color:#111;'> 11.34KB </span>","children":null,"spread":false},{"title":"stylesheet.css <span style='color:#111;'> 11.34KB </span>","children":null,"spread":false},{"title":"jacob-1.18-x64.dll <span style='color:#111;'> 200.50KB </span>","children":null,"spread":false},{"title":"jacob-1.18-x64.dll <span style='color:#111;'> 200.50KB </span>","children":null,"spread":false},{"title":"jacob-1.18-x86.dll <span style='color:#111;'> 164.00KB </span>","children":null,"spread":false},{"title":"jacob-1.18-x86.dll <span style='color:#111;'> 164.00KB </span>","children":null,"spread":false},{"title":"titlebar.gif <span style='color:#111;'> 10.45KB </span>","children":null,"spread":false},{"title":"titlebar.gif <span style='color:#111;'> 10.45KB </span>","children":null,"spread":false},{"title":"background.gif <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false},{"title":"background.gif <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false},{"title":"titlebar_end.gif <span style='color:#111;'> 849B </span>","children":null,"spread":false},{"title":"titlebar_end.gif <span style='color:#111;'> 849B </span>","children":null,"spread":false},{"title":"tab.gif <span style='color:#111;'> 291B </span>","children":null,"spread":false},{"title":"tab.gif <span style='color:#111;'> 291B </span>","children":null,"spread":false},{"title":"index-all.html <span style='color:#111;'> 193.25KB </span>","children":null,"spread":false},{"title":"index-all.html <span style='color:#111;'> 193.25KB </span>","children":null,"spread":false},{"title":"Variant.html <span style='color:#111;'> 141.63KB </span>","children":null,"spread":false},{"title":"Variant.html <span style='color:#111;'> 141.63KB </span>","children":null,"spread":false},{"title":"SafeArray.html <span style='color:#111;'> 106.88KB </span>","children":null,"spread":false},{"title":"SafeArray.html <span style='color:#111;'> 106.88KB </span>","children":null,"spread":false},{"title":"Dispatch.html <span style='color:#111;'> 87.21KB </span>","children":null,"spread":false},{"title":"Dispatch.html <span style='color:#111;'> 87.21KB </span>","children":null,"spread":false},{"title":"ActiveXComponent.html <span style='color:#111;'> 55.96KB </span>","children":null,"spread":false},{"title":"ActiveXComponent.html <span style='color:#111;'> 55.96KB </span>","children":null,"spread":false},{"title":"Variant.html <span style='color:#111;'> 54.69KB </span>","children":null,"spread":false},{"title":"Variant.html <span style='color:#111;'> 54.69KB </span>","children":null,"spread":false},{"title":"DispatchIdentifier.html <span style='color:#111;'> 49.49KB </span>","children":null,"spread":false},{"title":"DispatchIdentifier.html <span style='color:#111;'> 49.49KB </span>","children":null,"spread":false},{"title":"Dispatch.html <span style='color:#111;'> 47.45KB </span>","children":null,"spread":false},{"title":"Dispatch.html <span style='color:#111;'> 47.45KB </span>","children":null,"spread":false},{"title":"ReleaseNotes.html <span style='color:#111;'> 47.16KB </span>","children":null,"spread":false},{"title":"ReleaseNotes.html <span style='color:#111;'> 47.16KB </span>","children":null,"spread":false},{"title":"constant-values.html <span style='color:#111;'> 38.99KB </span>","children":null,"spread":false},{"title":"constant-values.html <span style='color:#111;'> 38.99KB </span>","children":null,"spread":false},{"title":"ComException.html <span style='color:#111;'> 24.74KB </span>","children":null,"spread":false},{"title":"ComException.html <span style='color:#111;'> 24.74KB </span>","children":null,"spread":false},{"title":"STA.html <span style='color:#111;'> 24.22KB </span>","children":null,"spread":false},{"title":"STA.html <span style='color:#111;'> 24.22KB </span>","children":null,"spread":false},{"title":"LibraryLoader.html <span style='color:#111;'> 23.04KB </span>","children":null,"spread":false},{"title":"LibraryLoader.html <span style='color:#111;'> 23.04KB </span>","children":null,"spread":false},{"title":"ROT.html <span style='color:#111;'> 22.01KB </span>","children":null,"spread":false},{"title":"ROT.html <span style='color:#111;'> 22.01KB </span>","children":null,"spread":false},{"title":"VariantViaEvent.html <span style='color:#111;'> 21.40KB </span>","children":null,"spread":false},{"title":"VariantViaEvent.html <span style='color:#111;'> 21.40KB </span>","children":null,"spread":false},{"title":"DispatchEvents.html <span style='color:#111;'> 21.15KB </span>","children":null,"spread":false},{"title":"DispatchEvents.html <span style='color:#111;'> 21.15KB </span>","children":null,"spread":false},{"title":"ComFailException.html <span style='color:#111;'> 20.31KB </span>","children":null,"spread":false},{"title":"ComFailException.html <span style='color:#111;'> 20.31KB </span>","children":null,"spread":false},{"title":"VariantUtilities.html <span style='color:#111;'> 19.91KB </span>","children":null,"spread":false},{"title":"VariantUtilities.html <span style='color:#111;'> 19.91KB </span>","children":null,"spread":false},{"title":"MainSTA.html <span style='color:#111;'> 19.87KB </span>","children":null,"spread":false},{"title":"MainSTA.html <span style='color:#111;'> 19.87KB </span>","children":null,"spread":false},{"title":"ComThread.html <span style='color:#111;'> 19.48KB </span>","children":null,"spread":false},{"title":"ComThread.html <span style='color:#111;'> 19.48KB </span>","children":null,"spread":false},{"title":"EnumVariant.html <span style='color:#111;'> 19.41KB </span>","children":null,"spread":false},{"title":"EnumVariant.html <span style='color:#111;'> 19.41KB </span>","children":null,"spread":false},{"title":"ActiveXDispatchEvents.html <span style='color:#111;'> 19.30KB </span>","children":null,"spread":false},{"title":"ActiveXDispatchEvents.html <span style='color:#111;'> 19.30KB </span>","children":null,"spread":false},{"title":"InvocationProxy.html <span style='color:#111;'> 16.95KB </span>","children":null,"spread":false},{"title":"InvocationProxy.html <span style='color:#111;'> 16.95KB </span>","children":null,"spread":false},{"title":"JacobObject.html <span style='color:#111;'> 15.77KB </span>","children":null,"spread":false},{"title":"JacobObject.html <span style='color:#111;'> 15.77KB </span>","children":null,"spread":false},{"title":"Currency.html <span style='color:#111;'> 15.57KB </span>","children":null,"spread":false},{"title":"Currency.html <span style='color:#111;'> 15.57KB </span>","children":null,"spread":false},{"title":"DispatchProxy.html <span style='color:#111;'> 15.25KB </span>","children":null,"spread":false},{"title":"DispatchProxy.html <span style='color:#111;'> 15.25KB </span>","children":null,"spread":false},{"title":"ActiveXInvocationProxy.html <span style='color:#111;'> 15.01KB </span>","children":null,"spread":false},{"title":"ActiveXInvocationProxy.html <span style='color:#111;'> 15.01KB </span>","children":null,"spread":false},{"title":"InvocationProxyAllVariants.html <span style='color:#111;'> 14.50KB </span>","children":null,"spread":false},{"title":"InvocationProxyAllVariants.html <span style='color:#111;'> 14.50KB </span>","children":null,"spread":false},{"title":"DateUtilities.html <span style='color:#111;'> 14.47KB </span>","children":null,"spread":false},{"title":"DateUtilities.html <span style='color:#111;'> 14.47KB </span>","children":null,"spread":false},{"title":"JacobException.html <span style='color:#111;'> 14.31KB </span>","children":null,"spread":false},{"title":"JacobException.html <span style='color:#111;'> 14.31KB </span>","children":null,"spread":false},{"title":"JacobObject.html <span style='color:#111;'> 14.25KB </span>","children":null,"spread":false},{"title":"JacobObject.html <span style='color:#111;'> 14.25KB </span>","children":null,"spread":false},{"title":"JacobThreading.html <span style='color:#111;'> 14.03KB </span>","children":null,"spread":false},{"title":"JacobThreading.html <span style='color:#111;'> 14.03KB </span>","children":null,"spread":false},{"title":"WrongThreadException.html <span style='color:#111;'> 13.80KB </span>","children":null,"spread":false},{"title":"WrongThreadException.html <span style='color:#111;'> 13.80KB </span>","children":null,"spread":false},{"title":"NotImplementedException.html <span style='color:#111;'> 13.62KB </span>","children":null,"spread":false},{"title":"NotImplementedException.html <span style='color:#111;'> 13.62KB </span>","children":null,"spread":false},{"title":"package-summary.html <span style='color:#111;'> 11.95KB </span>","children":null,"spread":false},{"title":"package-summary.html <span style='color:#111;'> 11.95KB </span>","children":null,"spread":false},{"title":"JacobReleaseInfo.html <span style='color:#111;'> 11.92KB </span>","children":null,"spread":false},{"title":"JacobReleaseInfo.html <span style='color:#111;'> 11.92KB </span>","children":null,"spread":false},{"title":"deprecated-list.html <span style='color:#111;'> 11.69KB </span>","children":null,"spread":false},{"title":"deprecated-list.html <span style='color:#111;'> 11.69KB </span>","children":null,"spread":false},{"title":"UsingJacob.html <span style='color:#111;'> 11.54KB </span>","children":null,"spread":false},{"title":"UsingJacob.html <span style='color:#111;'> 11.54KB </span>","children":null,"spread":false},{"title":"overview-tree.html <span style='color:#111;'> 9.86KB </span>","children":null,"spread":false},{"title":"overview-tree.html <span style='color:#111;'> 9.86KB </span>","children":null,"spread":false},{"title":"package-tree.html <span style='color:#111;'> 9.79KB </span>","children":null,"spread":false},{"title":"package-tree.html <span style='color:#111;'> 9.79KB </span>","children":null,"spread":false},{"title":"InvocationProxy.html <span style='color:#111;'> 9.58KB </span>","children":null,"spread":false},{"title":"InvocationProxy.html <span style='color:#111;'> 9.58KB </span>","children":null,"spread":false},{"title":"package-use.html <span style='color:#111;'> 9.25KB </span>","children":null,"spread":false},{"title":"package-use.html <span style='color:#111;'> 9.25KB </span>","children":null,"spread":false},{"title":"ActiveXComponent.html <span style='color:#111;'> 9.22KB </span>","children":null,"spread":false},{"title":"ActiveXComponent.html <span style='color:#111;'> 9.22KB </span>","children":null,"spread":false},{"title":"......","children":null,"spread":false},{"title":"<span style='color:steelblue;'>文件过多,未全部展示</span>","children":null,"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明