Search code examples
javahtmlpdfdocx4j

How to convert 2007 Docx files having (altchunk content) to PDF using java


How to convert 2007 Docx files having altchunk content to PDF using java.

Is there any way to convert A docx file which has A html content (Altchunk) . Into PDF using java


Solution

  • First, convert your HTML to well formed XML.

    Add docx4j-ImportXHTML to your path.

    Then invoke convertAltChunks()

    After that, your XHTML altChunks will be ordinary docx content, and you can convert the docx to PDF.