Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
  • Piet Souris

The question about generating RTF files using Java

Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the project I'm working on, PDF and RTF files are generated programmatically using iText Java API.
There's a very special element required in the output files. The following steps tell you how to create manually it in MS Word.

1. Go to "View"->"Header and Footer".
2. Insert a "textbox" into the header area.
3. Insert a picture into this textbox.
4. Move this textbox out of the header area, and put it on the left-hand side of the document.
Resize the picture so it runs from the top to the bottom on the page.
5. Therefore this left-side picture bar will show up on every page of this document since it's created in the header.
And it magically sits out of the header area.

I've achieved this element for PDF files using "WaterMark" object of the iText API. Unfortunately, iText documentation explicitly
claims it doesn't support WaterMark in RTF files.

I tried to post this question in the maillist of iText and got the answer that there's no plan to support this feature for RTF
files in the near future.

I've ever thought about Jfor, another Java API for generating RTF file, which I believed could be more powerful than iText to handle RTF
files since iText was originally designed to handle PDF files and does have too much interest on RTF. But Jfor requires a
XSL-FO input and I don't even know how to represent my required element in a XSL-FO.

I've also checked Jakarta POI, unfortunately, the component for handling RTF is still "in the early stages of development".
(Actually, they are still recruiting volunteer developers for this Open Source project).

Is there anybody here having encountered the similar problem before?

Any ideas and clues to help achieve this element are very welcome regardless of what APIs.
If I didn't make myself clear or any further information required, please shoot me an email at
Uh oh, we're definitely being carded. Here, show him this tiny ad:
Low Tech Laboratory
    Bookmark Topic Watch Topic
  • New Topic