How to convert UTF-8 string to RTF string in java?

Currently, my project requires an export report in MS Word, and I select using the RTFTemplate engine for this. But my problem is that I need to convert all characters to RTF string first. Any experiments with this problem can offer me?

+5
source share
2 answers

Yes.
You can use RtfDocument from iText:
new RtfDocument (). filterSpecialChar (baos, sentence, true, true);

I described this with details on my blog:
http://lechlukasz.wordpress.com/2010/02/03/rtftemplate-and-character-encoding/

+2
source

POI

- apache, MS Office.

0

All Articles