开发者

how to convert preformated text to RTF with java

开发者 https://www.devze.com 2023-01-22 22:07 出处:网络
helloI have aplain text emial (preformated with simple line-breaks)which I would like to convert to RTF to store it in database

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 be开发者_如何学运维cause 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?

0

精彩评论

暂无评论...
验证码 换一张
取 消