Back to blog

ebook comic conversion the hard way – azw3 to epub

12/09/2018 - Posted in do-it-yourself , knowledge , Software , tutorial Posted by:

Tags: , , ,

reading time: 2 minute

I recently wanted to convert an AZW3 comic to EPUB because I prefer EPUB as a free format. However, no matter how much I tried to get Calibre to do the conversion with various output settings, it always distorted or clipped the images. I tried to brute-force my way through the settings after deliberately choosing settings. Not even heuristic processing helped in any way. So I decided that there has to be another feasible way to convert. I consulted the interwebz and I found several sites that claimed to do what I want for free. I tried a few of them but they all produced the same terrible results.

That is when I found a forum post in a longer thread about a work around. It took some time to find this (rather crude description of a) solution so I decided to post a small tutorial on my blog. Keep in mind that this workaround will produce an EPUB that has only a cover image and the included images from the comic. No table of contents or other fancy things – I might add another post if I ever come around to play with the editor again. Prerequisites for this little guide is that you have a Linux installation with Calibre and the included ebook viewer and editor.

step-by-step guide

  1. Locate your ebook in the AZW3 format.
  2. Open it with Calibre’s ebook editor.
  3. Select all the images inside the ebook and export them to a folder on your hard disk that you can find.
  4. Open a terminal on your computer and cd into the folder with the images.
  5. Run the two following commands to first create a markup *.txt file with the necessary information and then a new EPUB file from the txt.
  6. >>> for i in *.jpeg; do echo \![$i]\($i\); done > alljpegs.txt
    >>> ebook-convert alljpegs.txt alljpeg.epub --output-profile tablet --formatting-type markdown
  7. After creating the EPUB file you can open it again with the ebook editor.
  8. Select the image inside the file to be the cover image and then go to “Tools -> Add Cover” – this sets the image as cover and updates all the necessary references inside the file. If you want you can run the check as suggested by the tool. 

Congratulations you are done now. After you saved your new EPUB file you can import it into Calibre, update the meta information and transfer it to your ebook reader.

Leave a Reply

Your email address will not be published. Required fields are marked *