Brendon said:
Hi everyone,
I'm currently developing a Rails content management system, and one of
the useful features we're trying to get sorted is a way to allow a
user to upload a word document or some other type of regular file, and
have it converted by the server to PDF.
I've seen a java programme called Alfresco do this using Open Office,
but I'm just wondering if there's another way that's more integrated
with Ruby?
If anyone knows if bits and pieces of tech already exist in this area
but they just haven't been brought together in this way yet, I'd be
keen to learn the names of these projects. Perhaps we can create a
plugin as a result of our larger project.
Looking forward to your ideas
Cheers,
Brendon
There are open source things that kinda sorta almost work, but they're
ephemeral by nature -- Microsoft proprietary formats are ... well ...
proprietary.

Abiword and OpenOffice.org can read most Word documents,
and lots of tools can write PDFs. Here's a list of things I have on Gentoo:
* dev-python/rtf2xml
Latest version available: 1.32
Latest version installed: [ Not Installed ]
Unstable version: 1.32
Use Flags (stable): -
Size of downloaded files: 1,255 kB
Homepage:
http://rtf2xml.sourceforge.net/
Description: Converts a Microsoft RTF file to structured XML
License: GPL-2
* dev-java/poi
Latest version available: 2.5.1-r1
Latest version installed: [ Not Installed ]
Unstable version: 2.5.1-r1
Use Flags (stable): -doc -elibc_FreeBSD -elibc_FreeBSD +source
Size of downloaded files: 20,128 kB
Homepage:
http://jakarta.apache.org/poi/
Description: Java API To Access Microsoft Format Files
License: Apache-2.0
* app-text/catdoc
Latest version available: 0.94.1
Latest version installed: [ Not Installed ]
Unstable version: 0.94.1
Use Flags (stable): +tk
Size of downloaded files: 490 kB
Homepage:
http://www.45.free.net/~vitus/software/catdoc/
Description: A convertor for Microsoft Word, Excel and RTF Files
to text
License: GPL-2
* app-text/docfrac
Latest version available: 3.1.1
Latest version installed: [ Not Installed ]
Unstable version: 3.1.1
Use Flags (stable): -
Size of downloaded files: 7,105 kB
Homepage:
http://docfrac.sourceforge.net/
Description: rtf/html/text conversion utility
License: LGPL-2.1
* app-text/highlight
Latest version available: 2.4.8
Latest version installed: [ Not Installed ]
Unstable version: 2.4.8
Use Flags (stable): -
Size of downloaded files: 925 kB
Homepage:
http://www.andre-simon.de/
Description: converts source code to formatted text ((X)HTML, RTF,
(La)TeX, XSL-FO, XML) with syntax highlighting.
License: GPL-2
* app-text/unrtf
Latest version available: 0.20.1
Latest version installed: [ Not Installed ]
Unstable version: 0.20.1
Use Flags (stable): -
Size of downloaded files: 448 kB
Homepage:
http://www.gnu.org/software/unrtf/unrtf.html
Description: Converts RTF files to various formats
License: GPL-2
* app-text/wv
Latest version available: 1.2.3-r1
Latest version installed: 1.2.3-r1
Unstable version: 1.2.3-r1
Use Flags (stable): +wmf
Size of downloaded files: 1,844 kB
Homepage:
http://wvware.sourceforge.net/
Description: Tool for conversion of MSWord doc and rtf files to
something readable
License: GPL-2
* dev-python/pyrtf
Latest version available: 0.45
Latest version installed: [ Not Installed ]
Unstable version: 0.45
Use Flags (stable): -
Size of downloaded files: 96 kB
Homepage:
http://pyrtf.sourceforge.net
Description: A set of python classes that make it possible to
produce RTF documents from python programs.
License: || ( GPL-2 LGPL-2 )
* dev-tex/latex2rtf
Latest version available: 1.9.16
Latest version installed: [ Not Installed ]
Unstable version: 1.9.16
Use Flags (stable): -doc
Size of downloaded files: 1,856 kB
Homepage:
http://latex2rtf.sourceforge.net/
Description: LaTeX to RTF converter
License: GPL-2
I think "wv" is the best of this crowd, but it's been a while since I
had to eat a Word document on my Linux box. As far as Word-to-PDF is
concerned, it's more or less built in to OpenOffice.org, so just
shelling out to that might get the job done. O

is quite a memory hog,
though, so you'll probably want to fire it up as a server and leave it
running.