Doc to PDF/HTML converter plugins available in Ruby?

Hi,

Are there any .doc to pdf and html comverter library available in Ruby?

Thanks in advance,
Invincible

On 2/18/07, Invincible C. [email protected] wrote:

Hi,

Are there any .doc to pdf and html comverter library available in Ruby?

Thanks in advance,
Invincible

a quick search of the ruby kitchen sink (http://rubykitchensink.ca/)
referred me to this:

http://ruby-pdf.rubyforge.org/pdf-writer/

Hi Jason,

Yes pdf-writer exists. but what I am looking at is some library/plugin
which
takes as input, a word doc and using may be pdf-writer generates a pdf
document.

-Invincible

On 2/18/07, Jason M. [email protected] wrote:

-Invincible

Does this help any?
http://www.curioso.org/2004/11/05/word2postscript/#more-65

On 2/18/07, Jason M. [email protected] wrote:

document.

-Invincible

Ack. I’ll give up until my wife comes back home. Heh.

On 2/18/07, Invincible C. [email protected] wrote:

Hi Jason,

Yes pdf-writer exists. but what I am looking at is some library/plugin
which
takes as input, a word doc and using may be pdf-writer generates a pdf
document.

-Invincible

Ah yes, sorry, I was distracted by my daughter so I didn’t read your
original email correctly. My apologies.

ok so the link says that first convert doc to postscript and then figure
out
how to convert postscript to pdf.

On searching I found another solution which requires openoffice and
dblatex
to be installed. I am figuring them out if they are feasible…
Following steps would be required for the doc to pdf conversion,

  1. Install open office
  2. Convert Microsoft Word to Docbook XML using Ruby and OpenOffice
    http://www.juretta.com/log/2006/08/10/convert_microsoft_word_to_docbook_xml_using_ruby_and_openoffice/
  3. Convert Docbook XML to pdf using http://dblatex.sourceforge.net/.
    http://dblatex.sourceforge.net/
    http://developer.skolelinux.no/itil/Makefile
    Success converting wiki page to PDF

Jason, on reading the code, looks like the document is being read and
being
printed to a “Apache pdf” file.
The script is referring to Win32,Win32::API,Win32::OLE …does that mean
it
will work only on Windows?

-Invincible

Here. Sorry for being lazy.

http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/238888?238688-239295

To any whom might read this: PLUG of the adopt-a-newbie thread, if you
feel like you’re not comfortable with Ruby yet this might help YOU!
:slight_smile:

Aur S.

I have got through following,

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/165458

Was there any other thread as well?

-Invincible.

I recall something VERY similar being discussed on the list a few days
ago, have a search :slight_smile:

Aur, Thanks for the link!

Regards
Jatinder

On 2/18/07, Invincible C. [email protected] wrote:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/165458

I recall something VERY similar being discussed on the list a few days
ago, have a search :slight_smile:

Ok, now that I’ve got a moment, here’s an alternative using openoffice
instead of MS Office. It’s a nice printer friendly page as well.

http://www.xml.com/lpt/a/1638

apparently it works on .doc files made in office versions back through
'97.
I dunno if that’d be a better fit than the approach laid out by aur, but
hey, I wanted to bring a real answer to the table :slight_smile:

You might look at http://www.artofsolving.com/opensource/jodconverter
which uses the OpenOffice API to run document conversions through
it. I used it in a project last year, and it seems to work quite
well on Linux. Since it runs as a web service, calling out to it
from Ruby is straightforward.

Hugh

I hope it works for Microsoft 2000 and onwards as well.

btw I found a solution yesterday by using pdfcreator free utility which
basically creats a virtual printer and lets me print my word doccument
to
the virtual printer which is nothing but a pdf target.
However this appraoch has following limitations,

  1. Works only on Windows machine.

I am going to try out openoffice solution and see if it fits my needs.

I appreciate all your help.
Thanks
Invincible

Hi Hugh,

Thanks for the link. the project is certainly worth a watch.
but I would not like to have an extra overhead of taking care of
installing
java, instead now I am looking for ruby integrations with openoffice
api’s.
Openoffice Api’s have been integrated with Java and C++, but not with
Ruby
yet. Some discussions have happened before on ruby talk for providing
this
integration,
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/92532
but
with no result :(.

On the way I came across, ooo4r which has not been updated for a while
now.
http://rubyforge.org/projects/ooo4r/

Has anyone worked with accessing/modifying/converting documents of
openoffice programmatically from Ruby?

-Invincible