|
@@ -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();
|
|
|
}
|