RTF to HTML Conversion

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
DB.
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???

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:

wvware.sourceforge.net

Best regards,

Axel

On Jun 29, 6:44 pm, “Axel E.” [email protected] wrote:

wvware.sourceforge.net

Best regards,

Axel

GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung:http://www.gmx.net/de/go/freemail

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

Control Word programmatically via Ruby using the win32ole library, as
follows:

  • 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 M.'s RubyOnWindows blog. Here’s a link to the Word
section:

http://rubyonwindows.blogspot.com/search/label/word

RTF is a text file, with a bunch of controls encased in the likes of
curly brackets {}

Lookie here for general info
http://en.wikipedia.org/wiki/Rtf

At the bottom you’ll find links to UnRTF(a gnu c app to convert rtf to
html etc), a ruby RTF library
(http://ruby-rtf.rubyforge.org/docs/index.html 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
website.

–Kyle

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs