实现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);
    }
}
上一篇:HTML转PDF目前最优解决方案:headless chrome


下一篇:python selenium 用法 和 Chrome headless