views:

202

answers:

2

I generate a report in doc format using Jasper, Jasper uses JRRTFExporter to generate doc reports, but wen i try and compare doc reports using POI it throws exception stating some header issues. Is there any way to convert rtf to doc in jasper or any API available to convert rtf to doc? Please help!

+1  A: 

There are some projects with handling rtf files, but all of them are third-party, so - not reliable, especially because rtf is not open format. Most reliable solution is to use word automation. Script which makes word to open rtf file and save it as .doc file will consist of tree strings of code in any language and can be easily googled :)

A: 

You could use Docmosis to do this if you want, or the OpenOffice UNO API directly since you don't need any other features of Docmosis. If it is an option, using Docmosis to generate the doc from scratch will give you less overhead, but you have to wear the cost of migrating.

jowierun