tags:

views:

607

answers:

2

Hi,

I want to create a Word or RTF file with a table of contents (with links to each section) from Java. From my understanding, iText & Apache POI do not support generating a table of contents. Some clients of the app still use older versions of Word, so I need a library that supports the older Word doc format. Does anyone know how I can do this?

Thanks,

Glen

+1  A: 

Look into the Java API for OpenOffice. It will do what you want.

Shane C. Mason
A: 

Late, but possibly helpful to others. Docmosis is a good option here. It works over the OpenOffice API but you don't have to spend the time learning that API. It provides template population and manipulation, a range of data source options and all the input and output options of OpenOffice. Specifically, it also updates the TOC and indexes at the final stages of document rendering.

jowierun