docx4j v2.0 released
July 22nd, 2008 by JasonWe’re pleased to announce that we’ve released v2.0 of docx4j.
docx4j is an open source Java library for manipulating OpenXML WordprocessingML documents, released under the Apache software licence. docx is the default file format in Word 2007 in Microsoft Office 2007.
docx4j supports the following:
- Open existing docx (from filesystem, SMB/CIFS, WebDAV using VFS)
- Create new docx (just one line of code)
- Programmatically manipulate the docx document (of course), including tables, images
- Import a binary doc (proof of concept)
- Import/export Word 2007’s xmlPackage (pkg) format
- Save docx to filesystem as a docx (ie zipped), or to JCR (unzipped)
- Apply transforms, including common filters
- Export as HTML or PDF
- Diff/compare paragraphs or sdt (content controls), outputting OpenXML with changes marked up
- Font support (font substitution, and use of any fonts embedded in the document)
- Use the power of JAXB to do other cool stuff
Get it from here.
What is it about this release that warrants being labeled v2.0?
The new features include image support, diff, and xmlPackage. A factor is the version numbering convention Microsoft has chosen for their Open XML SDK: its v2.0 which will first contain an API for WordprocessingML.
So think of a “level 1” API as one which handles the Open Packaging conventions (basically, the unzipping step), but leaves you to handle the document (part) content using low level XML (DOM, SAX, etc).
A “level 2” API is one which gives you a higher level API to manipulate the part content. At the very least, this would include objects to represent paragraphs, tables, styles etc. But you’d also expect it to be easy, for example, to add a paragraph using a specified style (maybe this is “level 3”? In any case, docx4j can do it)
Given that docx4j brought a “level 2” WordML API to the Java world 6 months ago, it is appropriate that it be labelled version 2.0.