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.)
Following source code shows how to create a Word RTF file using Java. Document rtf = new Document(); DocumentBuilder builder = new DocumentBuilder(rtf); builder. write("hello world"); rtf. save("created_file.
Because WordPad comes pre-installed on Windows, it's the simplest way to access an RTF file. Other word processors and text editors, such as LibreOffice, OpenOffice, AbiWord, Jarte, AbiWord, WPS Office, and SoftMaker FreeOffice, work similarly.
In TextEdit, you can see RTF directives as plain text. An RTF directive is information in a document that formats the contents of the document. In the TextEdit app on your Mac, choose TextEdit > Preferences, then click Open and Save. Select “Display RTF files as RTF code instead of formatted text.”
You can take a look at a new library called jRTF. It allows you to create new RTF documents and to fill RTF templates.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With