JAVA实测可用word各种格式转PDF,不失真。zip包中包含jar和测试类
如此简单
public static void word2Pdf(String srcFilePath,String pdfFilePath){
//加载word示例文档
Document document = new Document();
document.loadFromFile(srcFilePath);
//保存结果文件
document.saveToFile(pdfFilePath, FileFormat.PDF);
document.close();
}
JAVA实测可用word转PDF,高效不失真,支持docx转pdf,Spire.Doc
最新推荐文章于 2024-04-10 13:24:07 发布