Peuchele bio photo


Pedí pollo que yo pago la diferencia!

Photo Credit: Wikimedia Commons

Here is an easy way to convert from HTML to JPG. Actually, I’m converting the HTML to PDF and then from PDF to JPG.

First, install the following packages:

sudo apt-get install python-pisa imagemagick python-imaging

Then simply:

xhtml2pdf report.html
convert report.pdf report.jpg

Note: if you receive an error message in python “AttributeError: ‘NoneType’ object has no attribute ‘bands’” while trying to use the xhtml2pdf command, then you will need to apply this patch:

In other words, edit and move line 1501 self.load() to 1497, just before the if == 1: fix