Convert doc to pdf using Apache POI

前端 未结 3 1127
故里飘歌
故里飘歌 2020-12-09 13:46

I am trying to convert doc to pdf using Apache POI, but the resulting pdf document contains only text, it is not having any formating like images, tables alignment etc.

3条回答
  •  难免孤独
    2020-12-09 14:22

    As an alternative to POI (but still in the Java domain), you might consider docx4j (which I lead/maintain).

    For docx files, docx4j can convert to PDF by converting first to FO, and then using FOP to convert to PDF.

    For legacy binary doc files (as well as docx files), we have a high performance commercial solution. You can try that at http://converter-eval.plutext.com/plutext/converter, or get more info at http://www.plutext.com/m/index.php/products-docx-to-pdf.html

提交回复
热议问题