Kiranaditya Kiranaditya - 4 years ago 236
Java Question

Convert the RTF to PDF using JAVA which reads the tables in rtf document

What ways are there to convert an RTF to PDF that contains a table in the document in Windows or Unix using Java?

The option we have tried here are:

  • ITEXT - But the table inside the rtf document is not coming properly once converted to PDF. In short the PDF doesn't contain the Table. Here is the code gist. ITEXT for rtf to pdf java code gist

  • POI - Does apache POI support RTF document parsing? But I found that it is not supported. POI support for RTF

  • TIKA - Using Tika I am able to read the document, but the table in RTFis not parsed correctly and I don't know how to convert it to PDF. TIKA java code for reading rtf

We have looked into other options. Is possible to develop or convert RTF to PDF with Java?

Other options we looked into are in this link

Answer Source

Yes, its possible. Take a look at JasperReports!

There is also a good API available from Jaspersoft to code your custom PDF-engine and your custom datasource. Start with iReport (UI-Editor).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download