Zumbs' Blog

The truth may be out there, but lies are inside your head

Bulk conversion using LibreOffice

Posted by Zumbs on April 22, 2012

I do a lot of tabletop roleplaying. As a Game Master, I play with two different groups in the same world. The oldest running campaign has been running for more than a decade. The notes populate more than three large binders. As we do not play at my flat, it is infeasible for me to carry all that to the game. Rather, I try to pick out the important portions and leave the rest be.

A significant portion of my notes are stored on my computer in different formats. The newer documents are stored as odts, but older documents were created using various versions of WordPad and Word.

Over the last few years, the quality and functionality of ebook readers have been improving. Most of these handle formats like pdf. So, if I could convert my notes to pdf, I could bring an ebook reader with all the notes that I did not have room for in my bag. Some of the better ebook readers I have been looking at, even allow adding notes and handwriting as a new layer to existing pdfs, so I can make notes in the documents during play.

But I still need to convert all my files to pdf. There are more than 200 files involved, so doing it by hand is way to time consuming (and nigh impossible to maintain). My office program of choice, LibreOffice, comes with a nifty command line utility that is able to convert files from one format to another. Unfortunately, LibreOffice does not currently support bulk conversion on Windows.

And then there are all the custom needs, things that would be nice:

  • Keeping the same folder structure
  • Copying time stamps from the original file to the copy
  • Sync of files that are not odts (e.g. maps)
  • Ability to set metadata for generated pdfs

In the end, I wrote my own little utility program in .NET that have those features. It’s available on Sourceforge. LibreOffice 3.5 is required, but not bundled. The screenshot below shows the user interface.


Screenshot of the Bulk Converter Using LibreOffice utility. The upper part of the window is used to configure what the bulk converter should do. Move your mouse over the different options to get more information on what it does. The big, white space in the bottom is a text box that is used to write output from the converter. Press Go to start and Cancel to stop the current run.

As noted above, the utility only supports conversions from doc to odt and from odt to pdf. LibreOffice supports a lot of conversions that I have not enabled. Partly because I do not use them, and partly because it would require extensive testing to enable all of them. But I am open for requests 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: