Christian Schiepe
Christian Schiepe

Reputation: 113

Java RTF import, edit and export possible?

I use Apache Tika to parse RTF files to get the plaintext as string. Now I want to remove some characters from this string -> ok. Now I want to save the result as RTF again. (You can think of this process as modifying an RTF file by deleting a paragraph.) How is this possible? How can I export this string to RTF with Tika?

Upvotes: 5

Views: 2334

Answers (1)

user1352498
user1352498

Reputation:

There is a solution to edit docs, but it is a little complex. You can use the OpenOffice API to open a lot of types of docs and export it to other formats. I used it, sometime ago, to read data from a database and export as an odt and xls file.

I never used it to edit a doc, like a file from Writer or MS Word, but, by the OpenOffice documentation, I know that is possible to do it. Maybe this can be a cannon to kill a fly, but if you don find any other ways, could solve your problem.

The API works with Java, C++ etc.

Upvotes: 2

Related Questions