At Thu, 19 Jul 2012 12:00:23 -0400 Alan Meyer <
ame...@yahoo.com> wrote:
>
> Ladies and Gentlemen:
>
> I am working on a project that needs to print batches of user uploaded
> documents from time to time. Some of these documents are in Microsoft
> Word format.
>
> Does anyone know a good way to print a Microsoft Word doc in batch on
> Linux, without using Word and Windows?
OpenOffice will, but it doesn't really work properly as a CLI program.
It does have a command line option to convert to PDF, but it hangs --
at least the version shipped with CentOS 5.8 (3.1.1). I think some
part of it is waiting on some part of the GUI, even when the GUI is
disabled via command line switches. It *used* to work properly, so I
think this is some sort of bug (and a newer version might be fixed).
OpenOffice is a *huge* program / package and depends on the GUI
subsystem and might not be something you really want to install on a
server. Oh, OpenOffice 3.1.1 can't open docx files. I don't know if a
newer version of OpenOffice can open them.
>
> If I can't find a program to directly print a Word doc, the next best
> thing would be a program that batch converts the Word doc to something
> else that's easy to print, like PostScript or PDF. Format inaccuracies
> in the conversion are probably tolerable, as long as they don't mangle
> the content but, obviously, the more accurate the conversion the better.
There is no program that can directly print a Word doc on Linux without
using a GUI (MS-Word or OpenOffice). Antiword can *sort* of do it, but
either tosses the formatting (converts it to *plain text*) or only
works if the document is NOT UTF (converts the *textual* part to
PostScript). Antiword also drops any imbedded figures. OTOH, grabing
the source code for Antiword (or OO) and writing a pure CLI program
would be another (but very non-trivial) option.
>
> As a last resort, I could ask the users to save a copy of the document
> as a PDF, and print that, but they need the Word doc too so it would be
> an extra burden on them to save two versions and, if they make a
> revision, again, remember to save two versions.
This is actually your only 100% working option, but heavily depends on
user cooperation.
>
> If anyone has any suggestions I'd love to hear them.
There really aren't going to be any good suggestions.
>
> Thanks.
>
> Alan
>
--
Robert Heller --
978-544-6933 /
hel...@deepsoft.com
Deepwoods Software --
http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\
www.asciiribbon.org -- against proprietary attachments