rtf2html – converting RTF into HTML preserving links

In past I had to translate some text formatted with MS Word into HTML. I found out rtf2thml (originally developed by Chuck Shotton and Dmitry Popov), able to write a very clean HTML code yet not recognizing (and properly encoding) hyperlinks. I modified its version adding the capability of parsing the source text and writing HTML anchors in correspondance of every http, ftp and mailto link therein described.

Download and install

The software is available on GitHub. The repository consists of a single C source file called rft2html-1.2.c, which compiles straightforwardly:

$ gcc rtf2html-1.2.c -o rtf2html

Upon execution, the software reads an RTF from standard input and produces the corresponding HTML in standard output. Shell redirection can be used in order to process and produce files:

$ ./rtf2html < file.rtf > file.html

License

rtf2html is licensed uder the LGPL license.