Convert doc to pdf using Apache POI

前端 未结 3 1121
故里飘歌
故里飘歌 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:19

    I used OpenOffice/LibreOffice for exporting to PDF, it has some automation-support, i.e. something like

    unoconv -vvv --timeout=10 --doctype=document --output=result.pdf result.docx
    

    will convert the doc to pdf.

提交回复
热议问题