1、下载aspose.words的jar包,导入aspose.words依赖
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>15.8.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/aspose-words-15.8.0-jdk16.jar</systemPath>
</dependency>
2、去除水印
public boolean isLence() {
try {
InputStream is = HzbsSignTemplaceServiceImpl.class.getClassLoader()
.getResourceAsStream("license.xml");
License aposeLic = new License();
aposeLic.setLicense(is);
return true;
} catch (Exception e) {
return false;
}
}
license.xml内容
<License>
<Data>
<Products>
<Product>Aspose.Total for