Forum: Ruby RTF to HTML Conversion

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3cf9e7b33ce7aa6b0cebf06a04f7455f?d=identicon&s=25 Chirag Patel (chirag)
on 2007-06-29 14:55
i having document upload facility on my web page.
for word doc its working perfect.
for that we are converting doc to html using win32OLE and storing it in
while disply just showing it on web page.
But i am not be able to convert RTF file into HTML using Win32OLE.

is there any way to do it through Ruby Code??

RTF to HTML Conversion???
D0338c0de4cb3c5c17300396159933d1?d=identicon&s=25 Axel Etzold (Guest)
on 2007-06-29 15:46
(Received via mailing list)
Dear Chirag,
> But i am not be able to convert RTF file into HTML using Win32OLE.
> is there any way to do it through Ruby Code??
> RTF to HTML Conversion???

I am not sure about Ruby Code, but maybe you can do this using
wvware or abiword:

Best regards,

05e4e83c87a5700958fcb3efa8951a06?d=identicon&s=25 vasudevram (Guest)
on 2007-06-29 21:06
(Received via mailing list)
On Jun 29, 6:44 pm, "Axel Etzold" <> wrote:
> Best regards,
> Axel
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung:

Try this - it may work, haven't checked it out:

Control Word programmatically via Ruby using the win32ole library, as

 - open the RTF file in Word (you may have to tweak the Open dialog to
set the File Type field to RTF, since the default is DOC)
 - use the Save As option of Word to save it as HTML

For details, check out the good examples of controlling Word via Ruby
on David Mullet's RubyOnWindows blog. Here's a link to the Word

- Vasudev Ram
Biz site:
Blog on software innovation:
PDF creation/conversion toolkit:
9dec3df8319c613f6f4f14a27da0fdb4?d=identicon&s=25 Kyle Schmitt (Guest)
on 2007-06-29 21:23
(Received via mailing list)
RTF is a text file, with a bunch of controls encased in the likes of
curly brackets {}

Lookie here for general info

At the bottom you'll find links to UnRTF(a gnu c app to convert rtf to
html etc), a ruby RTF library
( mostly for creating,
but you never know), and lots of specs of the RTF format.

If you were so inclined, it would take (this is a guess here) between
10 and 30 regular expressions to create your own RTF to HTML method.
Heck if you just wanted the basics, probably 5 would do: 4 for style,
1 to strip everything you don't want to worry about.

Because frankly, automating word excel and power point sucks.  It's
easy to get orphaned processes lying around that way, and they suck up
an inordinate amount of ram for what you're using it for.  Office
automation is ok for single users only, it's barely acceptable for
build servers and test servers (where I've had the most experience
with it), and it's a completely unsuitable option for a production

This topic is locked and can not be replied to.