Page 1 of 1

Docx4j 8.3.3 released

PostPosted: Fri Feb 25, 2022 1:26 pm
by jason
docx4j 8.3.3 is now in Maven Central. Being in the 8.x series, minimum supported Java version is 8.0.

This is a minor release, with the most notable change being to docx to PDF via XSL FO:

Reworked FOP configuration:
- new property must be set to true for hyphenation to occur
- baseURI can be configured at docx4j.convert.out.fop.FopConfParser.defaultBaseURI; it now defaults to the current directory (".")
- you can set your own custom resource resolver if necessary

If you are using this in your code, you may need to make some minor changes to how it is invoked; see the example
at ... .java#L170

We also reinstated Panose support, which is required for best matching font mapper to work correctly (the best matching font mapper is most useful on Linux or OSX; on Windows you'd use the identity mapper). To use this, you'll first need to delete .docx4j/fop-fonts.cache to force docx4j to re-read the fonts

We also bumped various deps.

To use docx4j 8.3.3 via Maven, just add one and only one of docx4j-JAXB-Internal, docx4j-JAXB-MOXy,
or docx4j-JAXB-ReferenceImpl to your pom.

Otherwise, see

Re: Docx4j 8.3.3 released

PostPosted: Tue Mar 01, 2022 10:11 am
by jason
Please note that it has come to our attention that if you are using FOP, the facade method Docx4J.toPDF doesn't work in v8.3.3.

This is fixed at ... 8822af5412

In the meantime, you can either stick with v8.2.2, or convert to PDF as shown in the example at ...

Re: Docx4j 8.3.3 released

PostPosted: Thu Mar 03, 2022 7:36 am
by jason
Due to a subtle issue in the docx to PDF via XSL FO FOP font configuration, users are advised to wait for v8.3.4 in which this is corrected; due for release today.