How to convert formatted text to RTF using java

hello I have a simple textual emial (molded with simple line breaks) that I would like to convert to RTF in order to store it in the database

I have a desktop application written in .NET / C #, and for this I need to create a web interface (written using JAVA). So i need rtf2text and text2rtf conversion

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

Is it possible to do the opposite with rtfeditorkit or do I need to find another solution?

I already tried srv (simple rtf writer) to convert from text to rtf, but this did not work, because all the formatting disappeared after the conversion: (

So, how to do the text2rtf conversion to preserve the original text formation?

Please give me a sample code if possible.

Thanks in advance

+3
source share
1 answer

IText support for creating RTF http://www.lowagie.com/iText/

By the way, you declare that your email is plain text, and then save the formatting. Isn't that contradictory?

+1
source

Source: https://habr.com/ru/post/1772662/


All Articles