Compile tesseract for iOS SDK 6.0

Update 10/25/12

Added instructions to integrate an armv7s slice in liblept.a and libtesseract_all.a.

Update 09/24/12

To make the iOS integration easier, I made a Github repo containing an Objective-C wrapper for Tesseract. It relies on an other repo containing tesseract & leptonica libs. Feel free to improve them !

More informations about these repos on my next article.


I had troubles while following the compiling guide from this blog: Some dependencies are missing on a fresh Mountain Lion with Xcode 4.5, and more importantly: the won’t work.

Here is why: Xcode 4.5 and iOS SDK 6.0 don’t support armv6 anymore.

So here are the steps to build tesseract-ocr for iOS SDK 6.0.


Watch TV on Raspberry Pi with OpenELEC media-build

I’m using an Elgato EyeTV DTT to watch TV on my Macbook Pro. I wanted to use this USB tuner on my Rasperry Pi with Raspbian, but VLC doesn’t support hardware-accelerated video yet. So I found this post on Tiago Pires’ blog, which describes how to build OpenElec from scratch including media-build. Unfortunately, some things are missing in this post, and some others are unnecessary. A lot of things in this post comes from his article, so thank you ;)

Media-build is just a script that will get the most up-to-date dvb drivers and include them in OpenElec. I don’t think it’s required if your DVB tuner is supported for a longtime by Linux, but let’s include it anyway.


django-wkhtmltopdf on a linux (Webfaction) server

Generating PDF with python is not an easy thing. Here is what I’ve tried:

  • xhtml2pdf: the worst. It has a very bad CSS interpreter and it is pretty impossible to make a clean PDF out from a complex html page.
  • WeasyPrint: that’s better. It has its own HTML and CSS2 interpreters, and despite some minor issues it is fairly reliable. However it requires some big dependencies, and I eventually had some memory issues on my webserver.
  • wkhtmltopdf with its Django wrapper: for now, the best. It makes use of Webkit to render HTML+CSS+JS(!) pages, I don’t think you can do better. However, it requires QT, and this is big. Well, not the “classical” QT, a patched QT (that’s even worse) that allows to run without an X server. This is what I’m using for now in my projects

We’ll see here how to build wkhtmltopdf and a basic django-wkhtmltopdf usage. These steps has been tested on a Webfaction server (CentOS 6) through SSH.