warning: Creating default object from empty value in /media/lvz_server/var/www/ on line 33.

Printing a multi-page CD booklet

Creating and printing a multi-page CD booklet can be a bit of a headache. Firstly, not all programs support the re-ordering of pages required to make a foldable double-sided booklet. Moreover, the page-size is non-standard, which may give difficulties with commandline-tools such as Ghostscript and psnup. It took me a while to figure out how to do this on Ubuntu (Jaunty). Here's how you can do it:

  • Create the pages as you normally would, using a program of your choice (e.g. Writer, Scribus). Make sure you set the page-size of the document to 12.1 x 11.99 cm.

Embedding fonts in PDF-files

A while back I wrote a course-reader in Writer on Ubuntu. When I submitted it for printing, it turned out that not all fonts were embedded in the document, which led to various printing- and layout-problems. Here's some advice on how to create PDFs that are suitable for printing by third parties.

Recompressing (optimising) PDF files

There are at least three ways to do this in Ubuntu. You will need the packages ghostscript (for all methods, but installed by default) and pdftk (for method 2), and optionally a Java Runtime Environment (for method 3).

Method 1: ps2pdf

The ps2pdf script that comes with Ghostscript is meant to convert PostScript to PDF, but it will happily take PDF-files as input. Just try: ps2pdf input.pdf output.pdf

Scientific Software Favourites

Here's a little list of software I regularly use for science-related work.


Batch search & replace in PDF files

The other day I found out I had misspelled a word in a whole batch of automatically generated PDF files. Regenerating all of them would be a lot of work, as the PDF files were plots created using perl/PDL, gnuplot and epstopdf (available in texlive-extra-utils), and the input data was scattered over about 20 different machines.

Installing and using fonts in Ubuntu

Older versions of Ubuntu (before 8.04) used to have a built-in font-manager that could be reached by browsing font:/// in the file-manager. However, when Gnome upgraded to their new gvfs in 2008, their font manager and viewer both stopped working. In current Ubuntu-versions, at least the built-in font viewer (gnome-font-viewer) does work again. However the lack of a Gnome font-manager still leaves Ubuntu without proper font management out of the box, which is kind of annoying.

Video Processing and Encoding

For a couple of years there have been a number of great open-source programs around for encoding video, both in Windows and (Ubuntu) Linux. Some of them provide a nice graphical user interface, but the best ones are still commandline tools, such as ffmpeg and MEncoder. They are extremely flexible, but unfortunately also have a bewildering number of commandline options. This page lists a few invocations I regularly use.

Extracting DVD titles

Low-cost USB temperature logging

Recently I had the chance to play around a bit with a relatively cheap USB thermometer / temperature logger, the TEMPerHum, manufactured by Shenzhen RDing Tech Co., Ltd. This little device is basically a USB-key with a WinChipHead CH341 USB-to-serial converter, a Sensirion SHT11 temperature/humidity sensor, and a

Extracting TIFF pictures from MS Word for Mac documents

Recently I tried to open several old MS Word files created on a Macintosh in on my Ubuntu machine. The text part of the documents got converted just fine by Writer, but the images became rather messed up. Anything that had been imported as a bitmap in the original files just turned out as an empty black or white square. Now the problem was that I needed some of those bitmap images that were in the documents. So I tried opening the files in MS Word 2003 at work, and then saving them again as Word for Windows documents.

Data Clustering

I've written a fast perl/PDL implementation of UPGMA data clustering for very large datasets. The problem is that existing clustering packages have difficulty handling datasets with more than a few thousand data points. Especially the distance matrices tend to become a problem. For example, clustering the outcome of a 300x300 grid-based simulation (90,000 data points) would require a (non-sparse) distance matrix of 8.1 billion entries. This would use over 30 Gb of memory when stored as 4-byte floating point values.

Syndicate content