Hello!
I'm working on a project that requieres sending letters in PDF with a
customized layout from a web application. The layout templates come
from MS Word and therefore are given in RTF format.
Is there a Java library for
1) Getting data from the application in the RTF template, and
2) Converting that RTF to PDF?
All the RTF->PDF converters I could find so far didn't work for the
templates that I have.
But even an answer to the first question would help, since I could
perhaps use Adobe Acrobat to PDF creation.
Greetings,
Dimitri
Lew - 02 Feb 2008 00:42 GMT
> 2) Converting that RTF to PDF?
An excellent PDF library is iText.
<http://www.lowagie.com/iText/>
I don't think it knows anything about RTF, though.

Signature
Lew
Michael Justin - 05 Feb 2008 18:22 GMT
Dimitri Sverdlov schrieb:
> I'm working on a project that requieres sending letters in PDF with a
> customized layout from a web application. The layout templates come
> from MS Word and therefore are given in RTF format.
>
> Is there a Java library for
> 1) Getting data from the application in the RTF template, and
Maybe one step to the solution is to build an intermediate document in a
standard document format first.
There are some Java-based RTF readers around (including my ScroogeXHTML
converter), but I don't know if there is already a RTF -> XSL:FO
converter for Java, XSL:FO would make it 'easier' to convert to PDF.
ScroogeXHTML internally uses a DOM-like structure which could be used to
analyze and process the RTF content in a more generic way - including
some very advanced properties for international languages, like DBCS,
Unicode, and right-to-left text direction. However, it does not
understand some more difficult layout elements like tables.
Michael Justin

Signature
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com/
http://www.betabeans.de/
mavin@rochester.rr.com - 22 Feb 2008 20:46 GMT
> Hello!
>
[quoted text clipped - 13 lines]
> Greetings,
> Dimitri
I just evaluated a product from Novosoft called rtf2fo (
http://rtf2fo.com/index.html) which takes an rtf file and generates
intermidate FO which you can then use the apache fop library to
generate PDF. Unfortunately, the resulting PDF didn't look like the
RTF. It complained about Unsupported columns of different widths and
the spacing was not the same as the original. You may have better
luck.
Margaret