HOWTO Read rtf Files in Linux Console

Today I continue where I finished yesterday. I have so far written about reading doc and pdf files in Linux command line. Today I turn to rich text format, that is the files with extension rtf. Rtf is a very common format used by those who are at least slightly familiar with the compatibility problems caused by using Word's binary file format. Also rtf can be viewed using lightweight tools, it is not necessary to use OpenOffice.org to read the file.

I was reminded by my reader Reidar about catdoc, yet another Linux tool for reading windows file formats. As I don't have MS Word installed on any of my computers, I used Abiword for writing a short text (in fact this blog posting!) and saved it as a rich text file. And I was not disappointed by catdoc. It printed the content of my file on screen just like cat would do with an ordinary plain text file. You might be able to find it in the repositories of your distribution.

Catdoc is a tool that doesn't attempt to analyze and reproduce file formatting. It just extracts readable text from the file. What it can do, is to handle all versions of Word and convert character encodings. It can also read RTF files and convert Excel and PowerPoint files. You should install it in any system running on an old computer.



I thought that there are no console editors that can edit rich text files. I was not even sure whether it such editors would make any sense. But as I knew that Emacs can do everything one might some day need to do with her computer, I decided to google for "Emacs rtf". Surprisingly, or maybe not, there actually is an Emacs extension for editing rich text files and VIM should be able to edit rtf files out of the box. We are living in a strange world, aren't we?

4 comments:

ilembitov said...

Nice, but still, are there any console editors that allow you to create and edit RTF files without learning all that markup language?

Mikko said...

You could try Emacs/RTF, I have not tried it.

AFAIK there are no console word processors available. And RTF is, after all, a format for word processors.

Mikko said...

If you just want to create rtf files, you could use any editor for writing plain text and then use aft (=almost free text) to export the file to rtf.

Anonymous said...

Ever heard about Ted - A Linux rtf text processor: http://www.nllgg.nl/Ted

(Mark de Does - The author of Ted)