tags:

views:

2847

answers:

4

Hi,

I work on a web-based tool where we offer customized prints.

Currently we build an XML structure with Java, feed it to the XMLmind XSL-FO Converter along with customized XSL-FO, which then produces an RTF document.

This works fine on simple layouts, but there's some problem areas where I'd like greater control, or where I can't do what I want at all. F.ex: tables in header, footers (e.g., page numbers), columns, having a separate column setup or different page number info on the first page, etc.

Do any of you know of better alternatives, either to XMLmind or to the way we get from data to RTF, i.e., Java-> XML, XML+XSL-> RTF? (The only practical limitation for us is the JVM.)

+1  A: 

iText supports RTF.

joel.neely
+2  A: 

Have you had a look at the iText library? It's touted primarily as a PDF generator, though it can also generate RTF. I haven't had cause to use it personally, but the general feeling I get is that it's good, and the interface looks comprehensive and easy to work to in the abstract. Whether it would fit in well with your existing data model is another question.

Andrzej Doyle
Thanks for the tip - I'll look into it.
Ingvald
did itext stop supporting rtf? On their homepage I can't find anything about RTF - only PDF!
räph
ok, rtf was moved to a separate project, see: http://itextrtf.sourceforge.net/
räph
+1  A: 

If you could afford spending some money, you could use Aspose.Words, a professional library for creating Word and RTF documents for Java and .NET.

splattne
Thanks for the tip - it doesn't have to be free. After all, you have to spend money (cash or time) to earn money...
Ingvald
+1  A: 

You can take a look at a new library called jRTF (http://code.google.com/p/jrtf/). It allows you to create new RTF documents and to fill RTF templates.

Christian Ullenboom
Thanks! Interesting, even if it seems to lack a few things that I need.(Ref "What's not supported" in http://code.google.com/p/jrtf/ - nice table handling, gifs, good style/formatting control)
Ingvald