docx4j 11.4.7 is now available in Maven Central. For downloads, go to https://www.docx4java.org/downloads.html
The logic behind the version number is as follows:
- its docx4j 11 since it targets Java 11; If you are not using Java 11 or later, you should stick with docx4j 8.3.4 (compiled for Java 8).
- it is docx4j 11.4, not 11.3, since this release uses jakarta.xml.bind (as opposed to the previous javax.xml.bind)
Since this release uses jakarta.xml.bind, rather than javax.xml.bind, if you have existing code which imports javax.xml.bind, you'll need to search/replace across your code base, replacing javax.xml.bind with jakarta.xml.bind. You'll also need to replace your JAXB jars (which Maven will do for you automatically; otherwise get them from the relevant zip file).
This is a minor release (compared to 11.4.6), but with some significant improvements under the hood:
+ Set Docx4jUnmarshallerListener when preprocessing (fixes #474). When transforming during unmarshalling, use DOMResult instead of JAXBResult
+ Set Docx4jUnmarshallerListener via reflection when using binder. Previously, there was no Docx4jUnmarshallerListener when a binder was used.
+ Bump MBassador to 1.3.2; see EventMonitoringDemo sample for how to monitor docx4j events
+ New property docx4j.jaxb.preprocess.always, a list of parts to transform before unmarshalling is first attempted. Useful when you know your input docx always have issues owing to deficiencies in whatever application emitted them. Without this setting, the transformation does not happen until after an error is encountered (which is less efficient and results in log entries). See for example https://github.com/plutext/docx4j/blob/ ... rties#L207
+ Pptx: Properly addMcChoiceNamespace("v") - fixes regression which caused error on opening
To use docx4j 11.4.7 via Maven, add either docx4j-JAXB-ReferenceImpl or docx4j-JAXB-MOXy to your pom. https://search.maven.org/search?q=g:org.docx4j (and make sure your code imports jakarta.xml.bind, not javax.xml.bind)
docx4j 11.4.7 source code can be found in the default branch https://github.com/plutext/docx4j/