How to read a fixed-layout epub 3 on a Kindle 

Tags :
Kindle Paperwhite in my left hand with small text displayed

I use calibre to organise and manage my library of ebooks, and I recently ran into a format I had never encountered so far: epub 3 fixed-layout. It was a book with no illustrations and no special layout. Just words basically.

What are fixed-layout ebooks?

Fixed layout ebooks are digital books designed to preserve the same layout as their print counterparts, with images, text, and other elements arranged in a fixed position on the page.

In other words, the layout of each page is predetermined and fixed, so readers can’t adjust the font size, line spacing, or margins.

Source: www.hurix.com/fixed-layout-vs-reflowable-whats-the-difference

It baffles me as to why a publisher would distribute a ebook that isn’t a graphic novel that doesn’t reflow. Not only are they massive in size (mine was 176 MB) but there isn’t much you can do to make readable on a Kindle.

I work on the web, and I’m constantly dealing with the flow of content. It must be close to a couple of decades since I’ve worked on a fixed-layout.

Convert it

I first tried to convert it to epub in calibre which resulted in a mess of broken pages. It reminded me of what you get when you print an unscaled image: bits of it on multiple pages.

That’s when it dawned on me that I was dealing with a book of which each page was an image (hence its size).

Converting it to PDF didn’t work either, the ratio of the “images” were skewed producing a stretched out font uncomfortable to read. The margins were all wrong too.

Make a PDF from the page images

I decided to build a PDF from the individual images and transfer it to my Kindle via USB.

Make sure the epub isn’t DRM protected

Use the calibre plugin DeDRM (or NoDRM) to help you remove the DRM of your legally purchased books.

Convert it to ZIP format in calibre

In the main view, right-click on the book and select Convert individually 1 and select ZIP2 as output format.

Locate the image folder

Once the conversion completed, open the book’s folder by right-clicking or typing the letter O. Unzip the file generated, and navigate to the directory called,

{token}_files > OEBPS > image

This is where the image files are located. One file per page.

Rename the files

Make sure the sequence index has the same number of digits. In my case, the file names all started with the same token 9782203200678 followed by a sequence index: 1, 2, 3, …

It is important that the sequence index has the same number of digits in all the files. If not, the pages won’t be displayed in the correct order in the final document.

The Finder displays a natural sorting order, but the script we are going to use after requires an alphanumeric numbering. So if your book has fewer than a hundred pages use 2 digits (01, 02, …, 99) if it has under a thousand pages use 3 digits (001, 002, … 999). You get the idea.

I use one of my all-time favourite apps for this kind of task: Name Mangler.

Convert them to PDF

I use another favourite Mac utility for these tasks called RetroBatch, but you can use the macOS utility sips(Scriptable image processing system) to achieve the same result via a shell script:

#!/bin/bash
for i in /path/to/ebook-images/*.jpg
do
  sips -s format pdf $i --out /path/to/ebook-pdf/$i.pdf
done

Source: gumlet.com/learn/how-to-batch-convert-images-using-macos-terminal

Join all the PDFs into a single file

There’s a handy macOS Automator action you can use to do this called Combine PDF Pages,

$ "/System/Library/Automator/Combine PDF Pages.action/Contents/MacOS/join" -o /path/to/final-ebook.pdf /path/to/ebook-images/\*.pdf

Reduce the PDF size

PDF squeezer or macOS Preview 3 will do the trick nicely.

Transfer via USB or send to kindle

Depending on the size of the PDF file, transfer it via USB to the Documents folder on your Kindle from your Mac, or use Amazon’s ‘Send to Kindle’ service.

Readable —but not optimal

The final result will be a-okay’ish. You won’t be able to adjust the font size, and depending on the font choice of the publisher, it might be small and lack contrast. But you’ll be able to read it on your Kindle.

The only other solution I can think of right now, would be to extract the text content and build a new epub file from scratch. I might give it a shot on a rainy Sunday afternoon this winter.

Posted a response ? — Webmention it

This site uses webmentions. If you've posted a response and need to manually notify me, you can enter the URL of your response below.

Want more ? — prev/next entries