Simple Word Document Viewer

I have an eeepc900. It’s great for reading emails and stuff, but not very powerful. I installed abiword to read the occasional word document but it seems to eat the cpu. What I really wanted was something that could just view the documents as quickly as possible, so I started asking around…

< andrew> has anyone come accross a gui word document viewer for linux?
< phaxx> andrew: antiword tbh.doc | xmessage
< andrew >phaxx: catdoc tbh.doc | less would have a similar affect

Actually, this wasn’t that bad an idea, but I wanted more formatting than catdoc would give, and without the bother of opening a terminal.

I’ve used wvHtml before for processing mutt attachments, it does a pretty good job of converting word documents to html.

$ cat /usr/local/bin/doc-viewer
#!/bin/bash
#
wvHtml "$@" /tmp/$$.html
exec firefox /tmp/$$.html

This is what I came up with, works excellently. (I have /tmp mounted in ram on the eee, so I wasn’t too bothered about clearing from /tmp). I use doc-viewer as the default program to handle word documents in firefox, so word docs open within the browser 🙂

Posted January 30th, 2009 in Scripts.

Leave a response: