Converting multiple images into a pdf on linux

Update 2012-03-13
I don’t know if it was possible back in 2008, but nowadays you can simply use the convert command provided by imagemagick!

convert image1.jpg image2.jpg output.pdf

Normally, when I need to create a PDF, I can print to the PDF printer included with KDE. However, on my suse box, this only seems to work out of the box with KDE apps. Also, since I need to combine multiple images into a pdf, it is a bit cumbersome to use a PDF printer here.

I didn’t find a one-step solution, so here is how I did it:

  1. convert each image to a pdf
  2. merge all pdfs into one pdf file

For the first step I used bmeps, a tool which I recently discovered by accident 🙂 It is strange, when searching for the tool, I didn’t find it. So that’s why I give it some extra promo on my blog. 😉 Bmeps is a cross platform tool (yes, I already once used it succesfully on windows!). It used to be a (E)PS tool, but since version 2.0 it also supports PDF output (up to PDF version 1.4). As input, it accepts JPEG, netpbm and PNG (and TIFF partially).

As Bmeps doesn’t seem too popular, I wasn’t too surprised to learn my distro doesn’t have any package for it, so I had to build it from source. Bmeps has a dependency on dklibs, a collection from the same author which also needs to be compiled. But it turned out to be a pleasant experience: all prerequisites were already satisfied on my computer (except netpbm, but I don’t need that) and I just had to run the familiar “configure make install” (once for dklibs and once for bmeps of course).

After that, converting an image to a pdf is as simple as:

bmeps image.jpg image.pdf

Now we have a bunch of pdf files, we still need to merge them. For that I chose the quite popular pdftk. It wasn’t installed by default, but there does exist a package in the suse main repositories, so that was easy. Now, to combine all pdfs into one:

pdftk input*.pdf cat output output.pdf

And that’s it!

PS: there used to be a tool png2pdf from the same author for people wanting to convert PNG files, but this has been superseded by bmeps.

Boot process explained

It’s always nice to be reminded of the more important things in life, like how computers boot, *ahem* 🙂
Seriously, as a computer enthousiast, it’s like I _have_ to know about it, yet I don’t seem to be able to remember all the details 🙂
So guys like duarte chop it into nicely digestable pieces, ideally suited as bed time story material, so it can enter your subconscience when you go to sleep =)

Opera 9.5 released!

Yes, finally I will be able to use the latest flash player again in Opera on linux. 🙂
For me personally, the highlights in this release are:

  • Support for latest flashplayer
  • Even faster
  • Revamped mail backend. Might wanna reevaluate the newsfeed fetching performance. (It had become unacceptable with 50+ feeds)
  • Builtin bookmark syncing
  • HTML 5 support
  • Dragonfly: web dev tools

Read the full changelog here.

AVG 8

I have been a long time satisfied user of Grisoft’s Antivirus suite, for my parent’s computer actually. What’s important for me is a good configurable email scanner and a fast on-access scanner. Until 7.5 AVG seemed OK in those aspects. However, last week, I upgraded AVG 8 as I thought this was just a regular upgrade. Little did I know they vistafied the crap out of (or rather in) it. The interface is dumbed down so you always need to use the advanced options menu. They added some bloat features like the link scanner[1] and antispyware stuff. But worst of all: it slows down the entire system! When even my mother complains the system has slowed down since the upgrade, you can be sure it is a remarkable slowdown 😉 I am guessing this must be a bug, maybe it does not occur on all systems. I can’t believe they would make such a jump downwards. In the meanwhile, I am looking for alternatives. Avira’s Antivir seems quite okay..?

[1] fortunately, you can remove this feature through a custom installer command

Essential Kate tweak

If you like opening all your documents in a single instance of Kate, replace the command line “kate %U” used in KDE’s file binding by “kate -u %U”. This is actually quite well documented in Kate’s manpage as well as on the faq on the homepage, yet somehow I thought it is useful to note this one down as it is not accessible from the GUI.

You can find KDE’s file bindings here: control center > KDE components -> file associations. From then on, every file you like to open with kate through the context menu will use those settings, even when it’s not a txt.

liquid rescale open source implementation

In other gimp news.. You probably already saw the Content Aware Image Resizing movie on youtube. I read somewhere the guy was hired by adobe a few days after his initial presentation. I don’t know whether it’s true, he seems to work for Mitsubishi. 🙂 But that didn’t stop some guy to make an open source implementation in the form of a gimp plugin. It’s a public paper after all! 🙂

gimp 2.4

Yes, I’m late 😉

Be sure to check out the changelog walkthrough, otherwise you won’t understand what the fuss is all about 😉

Btw, on windows I had some trouble launching it with the modules. It seems my gimp was using its own supplied gtk runtime while the plugins just took the one in the env path. Long story short: just uninstall the freaking global one, long live data duplication! 😉

Extract audio from FLV tool

Ever wanted to split off the audio from a flash movie? I know you want to. 😉
Until now I simply used graphedit+ffdshow+dump filters but it is quite clumsy to work with. 😉 So today I did another google search, and yep, it’s an all active subject on the web by now. 🙂 It seems there are quite some tools now, but a lot also seem very questionable… Until I found this open source one (always trust that more ;)).

So, without further ado: enjoy Moitah’s tools!

P.S.: as a bonus, you get an avi too 😉