Skip to content
JAXB-based Java library for Word docx, Powerpoint pptx, and Excel xlsx files
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs updates for 6.1.0 Dec 15, 2018
etc Remove intermediate docx4j dir May 12, 2012
legals update address Apr 30, 2018
lib Remove intermediate docx4j dir May 12, 2012
m2 Remove intermediate docx4j dir May 12, 2012
sample-docs sample for TemplateAttach Dec 7, 2018
src Detect Java 10 and 11. Feb 27, 2019
xsd Support w14:EG_RPrOpenType Nov 23, 2018
.gitignore add maven central badge Apr 13, 2018
.project prepare for 6.1.1 release Jan 20, 2019 prep for 6.1.0 release Dec 7, 2018


Maven Central

What is docx4j?

docx4j is an open source (Apache v2) library for creating, editing, and saving OpenXML "packages", including docx, pptx, and xslx.

It uses JAXB to create the Java representation.

  • Open existing docx/pptx/xlsx
  • Create new docx/pptx/xlsx
  • Programmatically manipulate docx/pptx/xlsx (anything the file format allows)
  • CustomXML binding (with support for pictures, rich text, checkboxes, and OpenDoPE extensions for repeats & conditionals, and importing XHTML)
  • Export as HTML
  • Export as PDF (using Plutext's PDF Converter, or use docx4j-export-FO project)
  • Produce/consume Word 2007's xmlPackage (pkg) format
  • Apply transforms, including common filters
  • Font support (font substitution, and use of any fonts embedded in the document)

How do I build docx4j?

Get it from GitHub, at For more details, see

If you are working with the source code, please join the developer mailing list:

Where do I get a binary?

How do I get started?

See the Getting Started guide:

and the Cheat Sheet:

And see the sample code:

You'll probably want the Helper AddIn to generate code:

Java 9 or 10 with Eclipse

Use Oxygen.3a Release (4.7.3a) or later.

Make sure the Maven configuration is enabled.

In Eclipse, Ctrl-Alt-P, or right-click on the project, Maven, then select the appropriate profile. This will pull in the JAXB jars.

If errors show up, check your build path:

  • check you have Java 1.6 or later system library
  • check that for source folders, you don't have excluded ** for pptx4j or xlsx4j (if you do, select excluded then click remove)

Where to get help? or StackOverflow (use tag 'docx4j')

Please post to one or the other, not both

Legal Information

docx4j is published under the Apache License version 2.0. For the license text, please see the following files in the legals directory:

  • NOTICE Legal information on libraries used by docx4j can be found in the "legals/NOTICE" file.
You can’t perform that action at this time.