Viewing Word files at the command line

4 views
Skip to first unread message

nwco...@gmail.com

unread,
Mar 1, 2006, 9:59:10 PM3/1/06
to nwconfig
As a Linux user, there are times when you have to play nicely with
users of Windows or Mac OS -- such as when they send you Microsoft Word
files. When you receive a Word file, you can either follow Richard
Stallman's advice and refuse it, or bite the bullet and work with it.
Modern Linux word processors -- such as OpenOffice.org Writer, AbiWord,
KWord, and TextMaker -- can deal with most Word files. But if you don't
want to fire up a word processor in order to read or print the
document, you can turn to the command line. A handful of small but
powerful Linux command line utilities make viewing, printing, and even
converting Word files to another format a breeze.

Antiword

Antiword is a nifty application that can convert Word documents to
plain text, PostScript, and PDF. According to the developer, conversion
to DocBook XML is still experimental and doesn't always work well.

Antiword is very flexible. It can read and convert files created with
Word versions 2.0 to 2003, and you can run it on multiple operating
systems, including Linux, Mac OS X, RISC OS, FreeBSD, and OpenVMS. On
top of that, you can set the paper size for documents converted to
PostScript or PDF, include any text that was removed from the file (but
which Word notoriously keeps a record of), and display any hidden text.

For the most part, you'll just want to view a Word document. To do
that, you just have to type the following command:

antiword file.doc

The Word document will be converted to text and printed to the screen.
If you're running Antiword in a terminal window, you'll have to scroll
up to view the full text of the document. To get around this, you can
pipe the output from Antiword to the less utility, which will allow you
to scroll through the document page by page from the top:

antiword file.doc | less

Want more?
http://applications.linux.com/applications/06/02/22/201247.shtml?tid=47

Catdoc http://www.45.free.net/~vitus/software/catdoc/
wvWare http://wvware.sourceforge.net/

Reply all
Reply to author
Forward
0 new messages