aspose-words准备工作(一)
一、注册方法
-
aspose需要取得liceense授权
//授权方法 public static void getLicense() { try (InputStream is = AsposeUtil.class.getClassLoader().getResourceAsStream("License.xml")) { License license = new License();license.setLicense(is);}}
将授权文件放到resource目录下 该授权文件为15.8.0版本授权文件
<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature> </License>
2.jar包
15.8.0 jar包地址链接: https://pan.baidu.com/s/1T0huMOTIvDyrRUJuIL2SGQ 提取码: te4a
其他版本下载地址https://repository.aspose.com/repo/
下载jar包执行命令
mvn install:install-file -Dfile=jar包路径/aspose-words-15.8.0-jdk16.jar -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=15.8.0 -Dpackaging=jar
导入依赖
<dependency><groupId>com.aspose</groupId><artifactId>aspose-words</artifactId><version>15.8.0</version></dependency>