ly 3 年之前
父节点
当前提交
2d80b618b1

+ 3 - 3
master/src/main/java/com/ruoyi/project/common/controller/WordController.java

@@ -94,14 +94,14 @@ public class WordController extends BaseController
             }
 //             将word转成pdf
             PdfOptions options = PdfOptions.create();
-            try (OutputStream outPDF = Files.newOutputStream(Paths.get("D:/ticket/demo/tes12.pdf"))) {
+            try (OutputStream outPDF = Files.newOutputStream(Paths.get("D:/ticket/demo/html.pdf"))) {
                 PdfConverter.getInstance().convert(document, outPDF, options);
             } catch (IOException e) {
                 e.printStackTrace();
             }
             String srcPath = "D:/ticket/demo/sems.doc";
-            String desPath = "D:/ticket/demo/test2.pdf";
-//            Word2Pdf(srcPath, desPath);
+            String desPath = "D:/ticket/demo/openoffice.pdf";
+            Word2Pdf(srcPath, desPath);
         } catch (Exception e) {
             e.printStackTrace();
         }

二进制
master/src/main/resources/static/word/ticket.docx


二进制
master/src/main/resources/static/word/ticket1.docx