查询网站外链,工业设计效果图,磁力链网站怎么做的,十大国际贸易公司排名优先用 aspose-words-19.3.jar #xff0c;不需要读取license.xml#xff0c;导出后直接水印#xff0c;jar包最好直接放在项目resource目录下直接引用#xff0c;要不下载不下来 public static String doc2pdf(String fileName, String filePath) {try {String oldFile f…优先用 aspose-words-19.3.jar 不需要读取license.xml导出后直接水印jar包最好直接放在项目resource目录下直接引用要不下载不下来 public static String doc2pdf(String fileName, String filePath) {try {String oldFile filePath fileName;String newFile oldFile.substring(0, oldFile.lastIndexOf(.)).pdf;File file new File(newFile); //新建一个空白pdf文档FileOutputStream os new FileOutputStream(file);Document doc new Document(oldFile); //Address是将要被转化的word文档ParagraphFormat pfdoc.getStyles().getDefaultParagraphFormat();pf.clearFormatting();doc.save(os, SaveFormat.PDF);//全面支持DOC, DOCX, OOXML, RTF HTML, OpenDocument, PDF, EPUB, XPS, SWF 相互转换return newFile;} catch (Exception e) {e.printStackTrace();}return null;}