2015-10-20 72 views
0

我需要将docx转换为pdf。以下代码使用库xdocreport并且工作得很好。使用xdocreport,是否可以从docx文件读取图形?

问题是针对某些包含图纸的特定docx。它们在最终的pdf中不可见。我已经通过github上的live demo进行了测试,我也遇到了同样的问题。

所以我想知道,这是可能的,还是我需要使用其他库?哪一个 ? (dox4j似乎也不适用)。

final XWPFDocument document = new XWPFDocument(inputStream); 
final OutputStream outPdf = new FileOutputStream("myFile.pdf"); 
PdfConverter.getInstance().convert(document, outPdf, optionsPdf); 
outPdf.close(); 

回答

0

XDocReport不支持绘图。它可以支持它,因为docx-> pdf基于iText,它支持绘制,但它是一个很大的任务(任何贡献,欢迎!)

你可以看到here限制XDocReport docx-> pdf转换器。

相关问题