以下是代码
File file = new File("D:\\转pdf错误模板-001 (1).pdf");
FileOutputStream os = new FileOutputStream(file);
LoadOptions loadOptions = new LoadOptions();
loadOptions.getLanguagePreferences().setDefaultEditingLanguage(EditingLanguage.CHINESE_PRC);
Document doc = new Document("D:\\转pdf错误模板-001 (1).docx",loadOptions);
doc.save(os,SaveFormat.PDF);
转pdf错误模板-001 (1).docx (14.6 KB)
转pdf错误模板-001 (1).pdf (51.5 KB)