View MS Word files in the Commandline with AntiWord

Antiword is a neat little 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 can read and convert files created with Word versions 2.0 to 2003, and you can run it on multitude of OSes, including Linux, Mac OS X, 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

Related Posts

Tags: , ,

Leave a Reply