Search code examples
ms-wordpdf-generationxsl-foapache-fop

How to convert Word 2007 document to PDF using Apache FOP


I am currently using Apache FOP and have a stylesheet (possibly from RenderX) that converts Word 2003 XML documents (Saved as XML option) to PDF. However, this does not work for Word 2007 XML documents.

I am looking for options and/or suggestions on how to accomplish one of the following tasks -

Get a stylesheet that will transform Word 2007 XML file to:

  1. Word 2003 XML or

  2. PDF using FOP (using a stylesheet to create xsl-fo)

I am also open to any other options you might have. If possible I would like to do this with little to no cost. However, I am limited to using Java so a C# type option is not possible.

Thanks,


Solution

  • You could try docx4j, an open source Java library (ASL v2) which uses FOP to create PDFs from docx files.