Forum: Ruby Doc to PDF/HTML converter plugins available in Ruby?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Invincible C. (Guest)
on 2007-02-18 19:08
(Received via mailing list)
Hi,


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


Thanks in advance,
Invincible
Jason M. (Guest)
on 2007-02-18 19:18
(Received via mailing list)
On 2/18/07, Invincible C. <removed_email_address@domain.invalid> 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/
Invincible C. (Guest)
on 2007-02-18 19:22
(Received via mailing list)
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
Jason M. (Guest)
on 2007-02-18 19:26
(Received via mailing list)
On 2/18/07, Invincible C. <removed_email_address@domain.invalid> 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.
Jason M. (Guest)
on 2007-02-18 19:30
(Received via mailing list)
On 2/18/07, Jason M. <removed_email_address@domain.invalid> wrote:
> >
> > -Invincible
>
> Does this help any?
http://www.curioso.org/2004/11/05/word2postscript/#more-65
Jason M. (Guest)
on 2007-02-18 19:33
(Received via mailing list)
On 2/18/07, Jason M. <removed_email_address@domain.invalid> wrote:
> > > document.
> > >
> > >
> > > -Invincible
>


Ack.  I'll give up until my wife comes back home.  Heh.
Invincible C. (Guest)
on 2007-02-18 19:53
(Received via mailing list)
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_micr...
3. Convert Docbook XML to pdf using http://dblatex.sourceforge.net/.
http://dblatex.sourceforge.net/
http://developer.skolelinux.no/itil/Makefile
http://lists.debian.org/debian-edu/2006/05/msg00017.html


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
SonOfLilit (Guest)
on 2007-02-18 21:01
(Received via mailing list)
I recall something VERY similar being discussed on the list a few days
ago, have a search :-)
SonOfLilit (Guest)
on 2007-02-18 21:06
(Received via mailing list)
Here. Sorry for being lazy.


http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/rub...


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!
:-)

Aur S.
Invincible C. (Guest)
on 2007-02-18 21:07
(Received via mailing list)
I have got through following,

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

Was there any other thread as well?


-Invincible.
Invincible C. (Guest)
on 2007-02-18 21:25
(Received via mailing list)
Aur, Thanks for the link!



Regards
Jatinder
Jason M. (Guest)
on 2007-02-19 00:26
(Received via mailing list)
On 2/18/07, Invincible C. <removed_email_address@domain.invalid> wrote:
> > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/...
> > > I recall something VERY similar being discussed on the list a few days
> > > ago, have a search :-)
>

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 :)
Invincible C. (Guest)
on 2007-02-19 15:29
(Received via mailing list)
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
Hugh A. Cayless (Guest)
on 2007-02-19 15:51
(Received via mailing list)
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
Invincible C. (Guest)
on 2007-02-19 19:58
(Received via mailing list)
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/... ....
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
This topic is locked and can not be replied to.