简体   繁体   中英

how to convert preformated text to RTF with java

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

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM