office 文档转pdf

 本地先安装 金山wps,并确保可用

 

工程目录

office 文档转pdf

 

 

1、使用前,先执行install.bat 安装jacob 到maven本地仓库

2、复制

jacob-1.18-M2-x64.dll
jacob-1.18-M2-x86.dll

 

到jdk的bin目录

 

office 文档转pdf

 maven的pom.xml 

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 "> <modelVersion>4.0.0</modelVersion> <groupId>cn.xiaojf.util</groupId> <artifactId>office-converter-util</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>jacob</groupId> <artifactId>jacob</artifactId> <version>1.18-M2</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.5</version> </dependency> </dependencies> </project>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzpdpg.html