技术栈:jdk21 + spring boot 3.2.5 + aspose-words-21.5.0-jdk17
转换代码:
public static boolean Doc2pdf(String inPath, String outPath) {
File file = new File(outPath);
try (FileOutputStream os = new FileOutputSt…...)) { Document doc = new Document(inPath); doc.save(os, SaveFormat...return true; } 源文件(只有一页) Table-1.docx (4.1 KB) 转换后的pdf(两页) Table-1...