实现pdf转word
作者:互联网
引入依赖
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.pdf.free</artifactId>
<version>3.9.0</version>
</dependency>
仓库
<repository>
<id>com.e-iceblue</id>
<url>https://repo.e-iceblue.cn/repository/maven-public/</url>
</repository>
项目代码
public class Pdf2Doc {
public static void main(String[] args) {
pdf2Doc("hello1.pdf","hello1.doc");
}
private static void pdf2Doc(String inputName,String outputName){
PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(inputName);
//保存为doc
pdf.saveToFile(outputName, FileFormat.DOC);
}
}
标签:outputName,word,String,实现,static,iceblue,pdf,public 来源: https://blog.csdn.net/qq_21344887/article/details/120970716