How to Convert Word Documents to PDF & HTML in Ubuntu?

When it comes to OpenSource office productivity suits the current dominator is the LibreOffice (which was "used to be": OpenOffice = so long friend :/). And as with other major office suits, you can also use both LibreOffice and OpenOffice to save (convert) your documents to other formats as well.

But say that you have a simple text or any other document file in Ubuntu, then if you want to create a PDF file out of that, then you have to first open LibreOffice which is gonna take few seconds and then you open it and click on the menu and choose "Save As", seriously, it ain't fun and time consuming if you do that sort of things, a lot I meant :D.

But luckily, a sensible little programmer has come up with an excellent little script called Batch Convert Documents that uses either LibreOffice or OpenOffice built in tools which lets us convert any word document (that's supported by those office suits) to PDF or HTML format as easy as right clicking on the sucker!.

Main features...

*. Supports both PDF and HTML conversations.

*. Not just the GTK+/Gnome version but also has a separate script for Qt/KDE geeks too.

*. A simple progress bar.

*. Automatic notify via the system notify protocol (both successful conversations and errors).

"I'm done!, I'm done!, I'm done!" ... errr you "notifications!" ;-)...
Well, that's about it for features. The installation is quite simple.

Although I only tested it in Ubuntu 11.04 Natty Narwhal, but as long as you're able to install its dependencies (don't panic!, more below :P) I think it should work in 10.10, 10.04 and even in 11.10 as well.


As said, it has three dependencies which Ubuntu does not ship by default.

1. So before installing the Nautilus Script, let's install the dependencies. For that use the below command in your Terminal window.
sudo apt-get install unoconv xclip libnotify-bin
2. Now download the script from here and extract its contents (say, to your "Home" folder for instance).

Now open your terminal and change your directory to that extracted folder ("batch-convert-documents-0.2-2" for the current version) and enter the below command.
sudo install -m 755 batch-convert-documents /usr/bin/

3. Now to finish up, use the below commands.
cd nautilus-scripts

cp -r Convert\ documents ~/.gnome2/nautilus-scripts

OR if you use the graphical version, just make sure Nautilus shows hidden files and then copy the content of the "Convert documents" (inside of the sub-folder of the extract directory) to "~/.gnome2/nautilus-scripts" , manually.

I tested this script to convert ".doc" (older version of Microsoft word document format), ".odt" and a simple Text file to both PDF and HTML and they all worked without any errors!. Good luck.

No comments:

Post a Comment