How to use Antiword on Linux

To open Word document files, Linux users can use LibreOffice. However, not all Linux computers can open such heavy graphics applications. In this case, the alternative solution is to use Antiword to open document files. The article below TipsMake will guide you how to use Antiword on Linux.

Antiword is the ideal LibreOffice alternative, running in Terminal, perfect for "slow" computers or systems that do not need a graphical environment.

Continue reading TipsMake's article below to learn how to use Antiword on Linux.

Antiword is compatible with FreeBSD, BeOS, OS/2, Mac OS X, Amiga, VMS, NetWare, Plan9, EPOC, Zaurus PDA, MorphOS, Tru64/OSF, Minix, Solaris and DOS operating systems.

How to use Antiword on Linux Picture 1How to use Antiword on Linux Picture 1

1. Main features of Antiword

Antiword allows users to view and convert MS Word documents from the command line. We can convert to the formats below:

- Plain text
- Text format
- PDF
- Postscript
- XML ​​(only DocBook supported)

2. Limitations of Antiword

Antiword was last updated in 2005 and is not compatible with DOCX documents. Therefore, users cannot use Antiword to edit their documents.

3. Install Antiword on Linux

If the Linux distribution you are using has a built-in package management system, you can search for Antiword in one of the repositories.

If not download the .tar.gz archive from the Antiword page on Freecode. Then extract the file, access the antiword-0.37 folder and run the command below:

make

sudo make install

4. Use Antiword on Linux

In the instructions below TipsMake uses a resume example as a sample document. When opening this document in LibreOffice, it looks like this:

How to use Antiword on Linux Picture 2How to use Antiword on Linux Picture 2

The most basic way to use Antiword is to display and open documents:

antiword resume.doc

How to use Antiword on Linux Picture 3How to use Antiword on Linux Picture 3

As you can see, the default command doesn't preserve document formatting like font size, italics, and underlining, but the text looks more readable.

To display certain information, we use the "-f" flag in the command:

antiword -f resume.doc

How to use Antiword on Linux Picture 4How to use Antiword on Linux Picture 4

The above command does not display the correct WYSIWYG format, rather it displays markup-like syntax. For example, underlined text it displays as _underlined text_ and bold text with an asterisk *bold text*.

To convert a Word document into a PDF file, we must specify the paper size using the "-a" flag. Antiword supports paper sizes including: 10x14, a3, a4, a5, b4, b5, folio, letter, note, quarto, small size.

If you want, you can use the same paper size when converting to Postscript documents by using the "-p" flag.

For example below, convert a document to small-sized PDF format:

antiword -a tabloid resume.doc > resume-tabloid.pdf

Below is the resulting PDF file displayed in Okular:

How to use Antiword on Linux Picture 5How to use Antiword on Linux Picture 5

The underline and hyperlink in the email address are gone, overall the conversion was successful.

If you want to convert to Postscript, you can use "-L" to print in landscape mode.

The example below will convert the document to DocBook format:

antiword -x db resume.doc > resume-docbook.docbook

The conversion process preserves metadata, including author name and document creation date. The raw XML format looks like this:

How to use Antiword on Linux Picture 6How to use Antiword on Linux Picture 6

DocBook files in LibreOffice have the following format:

How to use Antiword on Linux Picture 7How to use Antiword on Linux Picture 7

Although it does not look similar to the original Word document, the file structure remains the same.

It can be seen that using Antiword to convert Word files to DocBook format works better than converting to XML format.

The above article TipsMake has just shown you how to use Antiword on Linux. In addition, readers can refer to some articles available on TipsMake to learn how to install Microsoft Office on Linux.


Refer to the article using Telegram on Linux command, this is a quite popular cloud-based messaging application, using Telegram on Linux command is a difference of the Linux operating system.

4.5 ★ | 2 Vote