3

hello I have a plain text emial (preformated with simple line-breaks) which I would like to convert to RTF to store it in database

I have a desktop application written in .NET/C# and have to create a web interface (written with JAVA ) for that So that's why I need rtf2text and, text2rtf conversion

I could do the rtf2text conversion with rtfeditorkit from the swing package....

can I do the opposite with rtfeditorkit or I have to find another solution?

I have already tried srv ( simple rtf writer ) to do the conversion from text to rtf, but it didn't work because all the formatting was gone after the conversion :(

So how to do the text2rtf conversion to preserve the original formating of the text?

Please give me a code sample if it is possible

Thanks in advance

troy1979
  • 31
  • 2
  • May I ask why you want to store the e-mail in the database in the RTF format? Any specific requirements you have in mind when choosing this format? – Wivani Aug 14 '11 at 19:52
  • What formatting do you want to preserve? Simple text cannot do bold, italics or suchlike? If you want something simpler, and more readable, than .rtf then you are looking at something like MarkDown. – rossum Aug 15 '11 at 20:36

1 Answers1

1

iText support RTF generation http://www.lowagie.com/iText/

BTW, you state that your email are plain text and then to retain formatting. Aren't those contradictory?

Wishper
  • 343
  • 1
  • 3
  • 11