docx4j is in Maven Central .. finally!

Home

News: docx4j is in Maven Central .. finally!

  1. docx4j is in Maven Central .. finally! (2 messages)

    Just released, version 2.7.1 of docx4j is the first version of docx4j which is in Maven Central.

    This article walks you through the process of installing Maven support in Eclipse, and then using that and a few lines of code to create a Word document which says "Hello Maven Central".

    docx4j is an open source (Apache v2) library for creating, editing, and saving OpenXML “packages” - not just docx documents, but also pptx presentation, and xslx spreadsheets.

    It is similar to Microsoft’s OpenXML SDK, but for Java rather than .NET. It uses JAXB to create the Java objects out of the OpenXML parts. See the 2.7.1 release announcement.

    Threaded Messages (2)

  2. Comparison to Apache POI?[ Go to top ]

    Where does it fit in relative to Apache POI's OOXML capabilities? The linked article has POI in the dependencies, so does this add something on top and use POI for writing/reading?

    TIA

  3. Comparison to Apache POI?[ Go to top ]

    It use POIFSFileSystem to read OLE objects, and HWPF for some ability to import old binary doc files. It is only those bits of POI we depend on (ie not its OOXML support).

    The main focus of docx4j is on the Office Open XML formats. For these, docx4j relies heavily on JAXB, and does not depend on POI (which uses Apache XmlBeans).

    In practical terms, I think it is fair to say that the main focus of POI is or has been on spreadsheets. Whilst docx4j supports those, docx4j's focus is on docx, and to a lesser extent pptx and xlsx (some people use it for xlsx, presumably because they want to use JAXB).

    For docx, it supports export to HTML and PDF, and has fairly strong templating capabilities.