How to create cover images for all the ebooks in ?

We are planning to convert all the ebooks in as epub files, so that any one can read them on the latest devices like andoid and ios devices.

We will be using to convert them as ebub.
There are around 500 ebooks.

We are looking for volunteers to convert them all as epub and mobi.

In the meantime, They all need cover images.

On my request, sathia tried a rails app.

But, it got unicode issue.

I tried using python to add a tamil text over a image.

The Tamil Text is displayed as splitted.

Sample Image:

I too got the same issue what sathia gets.

Then, How to solve this?

This seems a great unicode issue and there is no programmable solution.

Here comes the power utilities of GNU/Linux.
when programming cant help much, shell can help.

There is a utility called "wkhtmltopdf" which can convert html as PDF.

Shall we create html pages with all the book name and author name details?

Then, we can convert as PDF.
Then, PDF to image.

Will it work?

I Installed wkhtmltopdf and tried.
In my latest ubuntu, wkhtmltopdf is installed, but it is too old.
Got some issues like "Not compiled with QT support".

We have to get the latest binaries from its website.

Download wkhtmltopdf from

The websites gives latest binary with QT binding.

The one that comes with ubuntu in default is very old.

Download it from the site and install it.

It gives two utilities. 1. wkhtmltopdf 2. wkhtmltoimage

We use wkhtmltoimage to convert the html files into images.

Example :

wkhtmltoimage –height 640 –width 429 001.html 001.jpg

Using this method, we can convert all the html files to images directly.

Here is the detailed workflow:

1. Get all the book names,author name from

2. Copy them into a LibreOffice Calc spreadsheet.

3. Add serial number in a new front column.

4. Export as CSV file. Put $ as the delimeter.

5. Run the file


It will extract the book name, author and generate html files, with a background image for the cover art.

6. Download wkhtmltopdf from and install

7. Now, using a small shell script, we can convert all the html files into images.

for i in *.html; do wkhtmltoimage –height 640 –width 429 $i `basename $i .html`.jpg; done

Thats all.
We get all the images.

Background Image source:
License Public Domain CC0

Uploaded all the generated cover images here:

The source code repo:

Now, we have all the cover images.
We need volunteers to work on creating ebooks for all the books on

Contact me if you are interested in volunteering this.


Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s