我需要将 a 转换docx
为 a pdf
。以下代码使用该库xdocreport
并且运行良好。
问题在于某些docx
包含图纸的特定内容。它们在最终的 pdf 中不可见。我已经使用github上的实时演示测试了转换,我也遇到了同样的问题。
所以我想知道,这可能吗,还是我需要使用其他库?哪一个 ?(dox4j 似乎也不起作用)。
final XWPFDocument document = new XWPFDocument(inputStream);
final OutputStream outPdf = new FileOutputStream("myFile.pdf");
PdfConverter.getInstance().convert(document, outPdf, optionsPdf);
outPdf.close();