docx转为PDF的方法代码如下:
Document document = new Document(file.getInputStream());
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
document.save(outputStream, SaveFormat.PDF);
Files.write(Paths.get("/Users/p…...getSections()) { ParagraphCollection paragraphs = section.getBody().getParagraphs();...getParagraphs(); for (Paragraph paragraph : paragraphs) { ParagraphFormat...