Since the 17.2.0 release announcement 3 weeks ago, we also released 17.3.0 and 17.3.1, so this announcement summarises what's new across all 3 releases.
You can see changes split by release in the CHANGELOG.
To get docx4j 17.3.2, please see https://www.docx4java.org/downloads.html
Font embedding
- New org.docx4j.fonts.FontEmbedder (17.3.0), for embedding a TrueType font file in a docx, with the ability to specify a subset of the font. EmbedPolicy:
- AS_WORD (the default): a subset when w:saveSubsetFonts is set and fewer than 32 distinct characters of the face are used, else the whole font
- WHOLE
- SUBSET
- Numerous formatting improvements
- docx4j-export-fo now depends on the docx4j FO renderer (17.3.0) in place of Apache FOP 2.11, currently docx4j-fo-renderer 2.11-docx4j.6 (17.3.2)
- PDFs are smaller (17.3.0):
- PDFs are a fraction of their 17.2.x size on the docx4j FO renderer: every font is now subset
- Pictures are resampled as Word's PDF export resamples them own, to 200 ppi; JPEGs re-encoded at quality 75). The docx4j.convert.out.fo.images.resolution property (word, document, high-fidelity, or a ppi) or FOSettings.setImageResolution changes it.
- Cropped pictures are drawn cropped, as Word draws them (a:srcRect, v:imagedata's crop) (17.3.0)
- Header and footer heights are provided by the docx4j FO renderer, so docx4j can skip its old pre-pass over the headers and footers: about 7% faster(17.3.1)
- Section columns of unequal width are handled (17.3.2)
- A REF or PAGEREF field whose bookmark the document no longer has prints Word's error text, as Word's PDF export does ("Error! Bookmark not defined.", "Error! Reference source not found."), where it kept the result the field cached (docx4j.convert.out.fo.fieldErrors=cached for that).
Compress Pictures
- New org.docx4j.model.images.CompressPictures: Word's Compress Pictures on the docx package itself (17.3.0)
Property resolution
- PropertyResolver applies a table style, and the conditional formats a paragraph is under (17.3.1); consequent PDF and HTML output table formatting improvements
New module docx4j-digsig, formerly Plutext DigSig:
- Sign a docx, pptx or xlsx (XML-DSig, XAdES-EPES or XAdES-T, SHA-256 by default) so that Word, Excel and PowerPoint report a valid signature; validate signatures made by Office or by docx4j
- Documentation: docs/docx4j_DigitalSignatures.docx (the user guide: signing, visible signatures in Word and Excel, validation, trust checking, limitations, test certificates) and docs/DigitalSignatures.md (the per-format support statement and what was checked in Office)
PartProvider service (17.3.2)
- A part class that lives in another module is now found through the PartProvider service ([i]org.docx4j.openpackaging.parts.PartProvider,uses/provides) instead of Class.forName; docx4j-digsig provides the signature parts

