【问题标题】:Using xdocreport, is it possible to read drawings from a docx file?使用 xdocreport,是否可以从 docx 文件中读取图纸?
【发布时间】:2015-10-20 08:07:33
【问题描述】:

我需要将docx 转换为pdf。以下代码使用库 xdocreport 并且运行良好。

问题在于某些包含图纸的特定docx。它们在最终的 pdf 中不可见。我已经使用 github 上的实时 demo 测试了转换,我也遇到了同样的问题。

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

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

【问题讨论】:

    标签: java xdocreport


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-29
      • 1970-01-01
      • 2017-01-04
      • 2011-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多