Page 1 of 1

Docx4j 6.1.0 released

PostPosted: Tue Dec 18, 2018 5:48 pm
by jason
I'm pleased to announce that docx4j 6.1.0 made its way to Maven Central over the weekend.

Thanks to all those who contributed. Contributors are listed in the changelog.

For Maven users, 6.1.0 is in the Central Repository at

Otherwise, see

Docx4j 6.1.0 release notes

6.1.x will be our last releases which support Java 6. (The plan is that docx4j 8.x, when released, will require Java 8+, and so on. Easy to remember.)

API breaking changes have largely been avoided, so it should be easy to get your code running against this.

From the changelog at ...

Notable Changes in Version 6.1.0

IMPORTANT FIX: Force namespaces used in mc:choice to be declared top-level. If they aren't there, Word can't open the docx.

mc:Ignorable: support attribute in footnotes/endnotes, numbering, styles (already supported in main and headers/footers)

w14 namespace handling improvements: Don't drop these attributes in mc-preprocessor.xslt; Support w14:EG_RPrOpenType elements

PDF Converter now defaults to localhost endpoint to avoid information leakage. (controlled by docx4j property com.plutext.converter.URL) The localhost endpoint will only work if you download and install the converter there! If you choose to use, please only use it for light testing purposes.

BookmarksIntegrity checking now part of docx4j proper; used before ToC updating

AttachTemplate now part of docx4j proper; method cloneAs

OpenDoPE finisher: optional step in which formatting can be applied (this is often neater than using conditional content controls just for formatting)

OpenDoPE RemovalHandler: new Quantifier.ALL_BUT_PLACEHOLDERS (ie remove content controls, but keep any placeholders inserted where there is empty content), ability to specify Quantifier via; also ability to substitute your own RemovalHandler.xslt.

OpenDoPE: simplified component processing model [requires Enterprise]:

  • components don't have to be at the top paragraph level of the content tree, BUT:
  • component processing is now done before condition/repeat processing
  • component processing is not recursive anymore
components typically use the "main" answer file component processing is OFF by default Enable it with property "docx4j.model.datastorage.OpenDoPEHandlerComponents.enabled"