What is jOpenDocument?

jOpenDocument is a free library for developers looking to use Open Document files without OpenOffice.org.

jOpenDocument is Open Source (under GPL or commercial license).

You can automate the document creation and manipulation process. You can use jOpenDocument to:

- Generate dynamic documents from Java, XML or databases

dynamic documents from Java, XML or databases - Display and print files with built-in viewers

- Split, concatenate, and manipulate pages

- Automate filling out of template (created by OpenOffice or not )

filling out of template (created by OpenOffice ) - Use your preferred langage via standard ScriptEngine interface

via standard ScriptEngine interface - And much more...





News

September 22, 2014 : jOpenDocument 1.4rc2

Added

- Span class

- ODNodeDesc class

- Style.resolveReference()



Improved :

- ODPackage.validateSubDocuments() now handles extended documents (OpenDocument v1.2 §2.2.2)

- TextNode no longer restricted to TextDocument

- Support for multiple lines in cells



Fixed :

- Remove hard limit for ODXMLDocument.findUnusedName(), now print a warning

- Handles Vertical Tab, see TextNode.VERTICAL_TAB_CHAR

April 11, 2014 : jOpenDocument 1.4rc1

Added:

- Cell.getFormulaAndNamespace() and MutableCell.setFormula().

- Class Length to efficiently and accurately handle computations and conversion between different units.



Improved :

- Google Drive compatibility : sheets now always have display=true ; use centimetres by default for lengths.

- LibreOffice compatibility : by default no longer include years, months or days for durations. See MutableCell.getTimeValueMode().

- Framework base classes (XMLVersion, ODValueType, Style, etc) are now thread safe. This allows 2 threads to use 2 documents concurrently, but one document still cannot be used by 2 threads.

- ODPackage.validateSubDocuments() now also validates the manifest.



Fixed :

- Handle missing version in documents as it's optional in OpenDocument 1.0 and 1.1 (e.g. Microsoft Office 2007 and 2010 support v1.1 and omit it)

- No longer write time zone part, allow to configure the framework to behave like LO<4.1 or LO>=4.1 with regards to parsing dates with time zone (see ODValueType.isTimeZoneIgnored()).

See also FixTimeZone for existing documents.

- Column.setWidth() now updates the width of its table.

- Handle Range with only one cell.



API changed (incompatible with previous revision):

- Cell.getFormula() now throws an exception if the name space isn't OpenFormula. The old behaviour is available as getRawFormula()

- A lot of style classes now return Length instead of Float or BigDecimal.

May 31, 2013 : jOpenDocument 1.3

Here is the stable version of jOpenDocument 1.3.

The next step is the creation of a 1.4 branch.

jOpenDocument 1.3 is a major version of jOpenDocument. If you are using a previous version, we strongly encourage you to update.

Changes since 1.3rc2:

Added:

- Table.removeRows()

- getRangesNames() and getRange() in SpreadSheet and Table

Fixed:

- Handle times with no seconds in cells with no format

- Remove stale document statistics in meta.xml



March 11, 2013 : jOpenDocument 1.3 rc2

jOpenDocument 1.3 rc2 is now available for download.

Added:

- Table.createColumnStyle(width)

- TextDocument.getCharacterContent()

Improved:

- LengthUnit.format() now takes an arbitrary Number instead of BigDecimal (allow to avoid turning 2.357f into 2.3570001125335693)

- Table.setColumnCount() can now take a ColumnStyle (allow to create a column of arbitrary width)

- SpreadSheet.create() adds an automatic table style with display=true (LibreOffice always generates one, and Google Docs expects it)

Fixed:

- ODSingleXMLDocument.add() correctly orders body children





February 15, 2013 : jOpenDocument 1.3 rc1

jOpenDocument 1.3 rc1 is now available for download.

Added:

- Support for opening and saving flat XML with binary data (e.g. pictures)

- SpreadSheet.create(int sheetCount, int colCount, int rowCount)

- StyleStyle.getParentStyle()

- StyleDesc.createCommonStyle() to add styles

- TextDocument.getParagraphCount()

- Scripts (macros) and event listeners are now supported : added ODPackage.readBasicLibraries(), addBasicLibraries(), removeBasicLibraries() and readEventListeners()

Improved:

- OOConnexion handles UNC paths.

- OOInstallation handles LibreOffice 3.5 and 3.6.

- Optimized MutableCell.setValue().

- Various getTextValue() methods (using TextNode.getCharacterContent()) now correctly ignore graphical elements anchored to the paragraph.

Fixed:

- Cells with conditional styles having values that cannot be evaluated by conditions (e.g. a cell with >=5 condition and 'foo' value).

- Searching for the value of a formatting property (see §16.2 of OpenDocument v1.2, we now look in ancestor styles and in enclosing elements).

API changed (incompatible with previous revision):

- ODSingleXMLDocument.saveAs() now saves to a flat XML, use saveToPackageAs() to continue to save to a package.

- All XML entries in ODPackage are now parsed to Document (e.g. Basic/script-lc.xml).

Previously only sub-documents (content.xml, styles.xml...) were parsed, all other entries were byte[].





March 22, 2012 : jOpenDocument 1.3 beta1

jOpenDocument 1.3 beta 1 is now available for download.

It contains a lot of improvements and requested features. Because we are focusing on our open source ERP named OpenConcerto, we had to postpone the release of the 1.3 branch. Our ERP is powered by the jOpenDocument 1.3 branch for document generation, PDF conversion and display. OpenConcerto being downloaded 300 times per day, we are pleased to announce that our library is now the most used one!

New and Noteworthy:

Added:

- ODPackage.createFromStream()/createFromFile() handling both package and flat XML files

- Validator to unify JAXP and DTD validation

- XMLFormatVersion to handle differences in office versions

- Instructions in the README on how to validate XML

- Support for row and column groups

- Table.getUsedRange() to find out the range that covers all used cells

- Table.getCurrentRegion() to find out the range containing the passed cell and completely surrounded by empty rows and columns

- Cell.getError() to find out if a computation resulted in an error

- Support for default-style

- Support for data styles, MutableCell now correctly formats its value (including parsing of conditions)

Improved:

- added POINT and PICA in LengthUnit

- handle arbitrary table name (i.e. quotes)

- Table.duplicateRows() can now update shapes coordinates and handle merged cells

- performance: no longer expand repeated rows and lots of other small improvements

- ODDocument is now a superclass of SpreadSheet & TextDocument

Fixed:

- ODPackage now saves valid OpenDocument package files (i.e. split flat XML before zipping)

- index bug in Sheet.move()

- handle white space encoding and decoding in cells according to office version



November 9, 2010 : jOpenDocument 1.2 final

Here is the final version of jOpenDocument 1.2 . The next step is the creation of a 1.3 branch, the 1.3 branch will be dedicated to new features like the long awaited ODT Viewer.

jOpenDocument 1.2 contains small bug fixes (better handle elements without a style and fix the creation of empty tables).

August 9, 2010 : OpenOffice Addon 1.1

We are pleased to release the 1.1 version of our OpenOffice addon, it contains all the bug fixes regarding the known issues.

The first version of the addon was downloaded 10802 times, let's hope that our servier will not be on fire!

As usual, the update is highly recommended.

April 13, 2010 : jOpenDocument 1.2 beta 3

jOpenDocument 1.2 beta 3 is available for download.



New and Noteworthy:

Fixed:

- boolean issue on RhinoTemplate

Improved:

- ODS viewer on cell layout

- when changing cells value reuse the first paragraph to keep style

- ODPackage.getStyle() handles styles with the same name in content.xml and styles.xml

- ODPackage now keeps the entry method (compressed or not)

- various speed optimizations

Added:

- Table.getHeaderRowCount() and getHeaderColumnCount()

- Sheet.move() & .copy()

- Cell.getValueType() public as requested

- Cell.getTextValue()

- MutableCell.merge()

- Frames can now be found using getDescendantByName()

- LengthUnit to handle conversions

- GraphicStyle, SyleGraphicProperties and SyleTableCellProperties

- StyledNode.getPrivateStyle() which allow to safely modify any style property by duplicating it if necessary

API changed (incompatible with previous revision):

- numeric values are now mapped to BigDecimal instead of Float for more precision

- use java.awt.Color instead of String for color properties

- renamed NS to XMLVersion and made it an enum





August 13, 2009 : jOpenDocument 1.2 beta 2

jOpenDocument 1.2 beta 2 is available for download.



New and Noteworthy:

- build system fixed (jdk 5 compilation & broken properties)

- code cleaning

- mimetype attribute added in spreadsheets

- fixed: timezone format





August 3, 2009 : jOpenDocument 1.2 beta 1

We are pleased to announce the first beta version of the next version of our open document library.

jOpenDocument 1.2 beta 1 is available for download.



New and Noteworthy:

- name accessors for spreadsheets

- add/remove table from text documents and sheet from calc documents

- getTableModel() on a named range (see Modify an existing spreadsheet)

- unmerge on cells

- remove columns

- improved cell styles

- paragraph and heading creation for text documents

- various fixes and performance improvements





May 12, 2009 : One year later

A few years back, we started the development of what is called now jOpenDocument.



Today, I'm glad to announce that we reached 10 000 downloads of jOpenDocument 1.1 !

We recently switched our mailing list to googlegroups and now provide a mailing list archive.

We had a lot of requests regarding an "ODT Viewer" in order to provide a way to display, print and export to PDF your text documents. jOpenDocument already provides an "ODS Viewer" for Spreadsheet documents. Unfortunatly we have no budget to pay a full team working on an ODT renderer, so you will have to be patient (or to find us sponsors).

February 7, 2009 : Commercial support

Seeing the growing number of request about commercial license and support, we added a special topic on the website. It will not mean that we will stop providing help and free support on the mailing list. (we are considering a mailing list archive too).

November 10, 2008 : Bronze Award

We are glad to announce that Sun Microsystems awarded us with a Community Innovation Bronze Award for "Java + Open Document = jOpenDocument", more here.

October 10, 2008 : jOpenDocument 1.1 final

Here is the final version of jOpenDocument 1.1 . The next step is the creation of a 1.2 branch and jOpenDocument 2.0.Tthere is also some Big News but you will have to wait november...

jOpenDocument 1.1 contains small bug fixes in JavaScriptFileTemplate and convenient methods (putAll in DataModel). This version is tagged as "production ready".

July 28, 2008 : jOpenDocument 1.1 beta3

We are pleased to announce the third beta version of the next version of our open document library.

jOpenDocument 1.1 beta 3 is available for download. We included:

- a new API for metadata manipulation

- a new tutorial about metadata

- full support of measure units

- row duplication improvements

- an useful XML validator ( isValid() on XMLDocument )

- a convenient superclass for styles

- an unified table handling and a long awaited setColumnCount() method on Tables





June 11, 2008 : jOpenDocument 1.1 beta2 and Java 5 support

We are pleased to announce the second beta version of jOpenDocument 1.1.

jOpenDocument 1.1 beta 2 is available for download, a Java 5 version is included.



June 10, 2008 : jOpenDocument 2.0

In order to avoid fragmentation, the next version of the jOpenDocument model will be based on the in-progress ODFDOM from Sun Microsystems.

We plan to join forces and wish to share a common model. Our top level API will not change, so you can start using now jOpenDocument 1.1 without fear.



May 29, 2008 : jOpenDocument 1.1 beta

We are back from the US, JavaOne was great and we are pleased to announce the the first beta version of jOpenDocument 1.1. jOpenDocument 1.1 beta 1 is available.

It includes bugfixes and requested enhancements.



April 25, 2008 : OpenOffice Addon 1.0

The first release of the OpenOffice Addon is available.

jOpenOffice.org is now 300 visitors (downloads) per day, amazing!

April 18, 2008 : jOpenDocument 1.0

The first release of jOpenDocument is available.

A new tutorial about PDF generation is online.

April 12, 2008 : Welcome to OpenDocument.org

We are working on the first release that is planned on April 19th. Tutorial and a full documentation will appear soon after.

Meet us at JavaOne 2008 !

A part of the team will hang out in the JavaOne Pavillon. Please look for us! We would love to get free pass to the complete conference...



