Create an ebook using images on GNU/Linux

Today, my girlfriend had to create an ebook (in pdf) using some images acquired from a scanner. After searching for a while on google how to do it I ended up on the ImageMagick website and remembered that it was the tool to manipulate images, so I gave it a try and luckily (for me) it worked!

After this brief introduction, it’s time to get your hands dirty!

Acquire the documents

The first step is to scan all of your documents using xsane. For a good quality use a DPI of 200 or more. You should name them accordingly to the order of inclusion. For example: 0001.png, 0002.png, …

Create the PDF

Now in a terminal, issue this simple command to generate your own customized ebook.

convert -define pdf:use-trimbox=true -compress jpeg -quality 95% *.png ebook.pdf

Just keep in mind that it can take some time if you have a lot of pages.

That’s all folks !


comments powered by Disqus