Skip navigation.
Java OpenDocument Reports


JODReports, Java OpenDocument Reports, is a solution for creating office documents and reports in OpenDocument Text format from templates that can be visually composed using the Writer word processor. These documents can then optionally be converted to other formats such as PDF, Word and RTF with JODConverter.

Main Features

  • Templates are OpenDocument Text (ODT) files
    • They can be created using the Writer word processor, which is open source and can be downloaded for free from
    • The OpenDocument format is now an OASIS standard and is quickly becoming increasingly popular
    • Writer can import documents from most other office suites, so it is possible e.g. to import a Microsoft Word document as a starting point for a template
  • Powerful templating instructions, including
    • Dynamic field replacement
    • Conditionally displaying a document portion based on a test expression
    • Repeating a document portion (e.g. a table row) for each item in a collection
    • Replacing an embedded image
    • And more... JOOReports is based on the popular FreeMarker templating language
  • Data to be merged into the template can be supplied as
    • A simple Map of variables
    • A Java object model
    • XML
  • Document are produced in ODT format, and can then be converted to PDF, Word or RTF with JODConverter
  • Processing instructions can be inserted in a visual, non-obstrusive way without cluttering the template layout
    • Fields can be specified using Writer input fields
    • More complex instructions can be inserted as scripts hidden into the document
  • Special support is provided for web applications, including integration with the Spring MVC framework
  • Licensed under the terms of the LGPL, which basically means it is free to use in both open source and commercial projects

The Concept

So what makes JODReports different from other projects addressing the same category of problems?

The idea behind this project came to me in 2003 after I worked on a couple of invoicing/reporting projects. I was surprised by how much time I had to spend composing and adjusting the layout of templates, rather than writing Java code or doing business analysys.

Why can't templates be regular word processor documents? I thought. That way, I could ask my clients (internal or external) to create a sample document exactly how they want it, send it to me and all I would have to is to add a few processing instructions.

So the goals for this project were:

  • Template layout can be composed by non-programmers using a word processor
  • Simple templates can be composed and modified entirely by non-programmers
  • More complex templates need the programmer just to insert processing instructions into the supplied template layout documents immediately seemed the obvious choice since they are an open XML format.