1

I'm looking for a simple HTML2RTF converter that I can use on my website which is using a *nix like Operating System. I haven't found anything on the internet, and was hoping the SO community would help me.

PS: I don't want to implement this from scratch, and it doesn't really matter what language it's in, as long as I can run it on a *nix like system. If you guys have already some personalized implementation, the language preferred would be PHP.

Charles Stewart
  • 11,661
  • 4
  • 46
  • 85
Luca Matteis
  • 29,161
  • 19
  • 114
  • 169

4 Answers4

2

If OpenOffice on the command line is an option, check out this Forum entry with a great number of starting points. There are certainly stand-alone tools as well, but OpenOffice has quite good rendering capabilities and I'm quite sure it will successfully convert a lot that other converters won't (bulleted / numbered lists, for example).

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
1

Easiest way would be to use the following PERL module.

http://metacpan.org/pod/HTML::FormatRTF

Quick and about 10 lines of code :)

szabgab
  • 6,202
  • 11
  • 50
  • 64
0

Zopyx.convert is based on the high-quality BeautifulSoup html parser. It needs Java & Jython.

If the Java dependency is too much, you should be able to use BeautifulSoup to iterate over the HTMl and build up the output using the PyRTF RTF generator. Not a five-minute task!

Charles Stewart
  • 11,661
  • 4
  • 46
  • 85
0

You might consider combining gnuhtml2latex and latex2rtf

Arnout Engelen
  • 6,709
  • 1
  • 25
  • 36