使用aspose的相关包
1,测试环境springboot,jdk1,8,aspose-cells-8.5.2.jar 用于转换xls,aspose-words-16.8.0-jdk16.jar 用于转换doc
2,所用jar,签名百度网盘地址
链接:https://pan.baidu.com/s/14zwqI4d5-WweXKki8LyI-A
提取码:0kgc
3,下载jar加入本地maven仓库
控制台执行,命令如下:(将install-file值改成自己存放jar的路径)
mvn install:install-file "-Dfile=aspose-cells-8.5.2.jar" "-DgroupId=com.aspose" "-DartifactId=aspose-cells" "-Dversion=8.5.2" "-Dpackaging=jar"
mvn install:install-file "-Dfile=D:\Program Files\lib\aspose-words-16.8.0-jdk16.jar" "-DgroupId=com.aspose" "-DartifactId=aspose-words" "-Dversion=16.8.0" "-Dpackaging=jar"
4,引入jar
<!-- xls转pdf -->
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cells</artifactId>
<version>8.5.2</version>
</dependency>
<!-- word转pdf -->
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>16.8.0</version>
</dependency>
5,将下载的license.xml放置项目resources下
这也是除了idea里install以外的另外的一种安装本地包的方式。