技术栈: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…...FileOutputStream(file)) { Document doc = new Document(inPath); doc.save(os...e) { log.error("[doc2pdf]: convert to pdf failed, inPath={}, outPath={}...