PDF & Documents

E-books without the confusion: EPUB, PDF, Kindle and Markdown

An EPUB is a little website in a ZIP file; a PDF is a set of printed pages. Most e-book confusion comes from treating one like the other.

3 minute read

You download a book and get an .epub. Your friend sends one as a PDF. Your Kindle wants something else again, and a manuscript you wrote in a text editor is in none of these. E-book formats look like a mess, but the confusion mostly comes from one difference.

Reflowable versus fixed

An EPUB is essentially a small website in a ZIP file: chapters written in XHTML, a stylesheet, images, and a table of contents. A reading app lays the text out to fit whatever screen it is on and whatever font size you choose. That is why the same book has 300 pages on a phone and 180 on a tablet, and why changing the text size never makes you scroll sideways.

A PDF is the opposite. It records exactly where every line sits on a fixed page. It looks identical everywhere, which is perfect for printing, for academic papers where page numbers matter, and for layouts with columns and figures. On a small screen, though, a page designed for paper means zooming and panning.

So the rule of thumb is simple. For reading text on a device, prefer EPUB. For printing, annotating pages or preserving a precise layout, prefer PDF.

Which reader wants what

Reader Format
Apple Books, Kobo, Google Play Books, most Android apps EPUB
Kindle EPUB, sent through Send to Kindle, which converts it
Any computer, any phone, any printer PDF

Amazon's Send to Kindle service started accepting EPUB in 2022 and converts it for the device, so EPUB is now the format that works almost everywhere. The older Kindle formats, MOBI and AZW, are no longer needed for books you send yourself.

Reading an EPUB as a PDF

Sometimes you need a PDF anyway: to print a book, annotate it on a tablet with a PDF app, or send it to someone with no e-reader. Converting means choosing a page size and laying the text out once. The EPUB to PDF converter typesets the book on 6 × 9 inch pages, a common paperback size, with the title and author first and the chapters in reading order. Headings, paragraphs, bold and italic carry across; the e-book's own styling, written for flexible screens, does not.

Two limits come from the book rather than the converter. Books bought from most stores are protected with DRM, which encrypts the text, and a DRM-protected book cannot be converted; the tool does not attempt to remove that protection. DRM-free books, such as those from Project Gutenberg, Standard Ebooks or many independent authors, convert normally. And the PDF uses standard Latin fonts, so books mostly in Hindi, Arabic or Chinese are better printed from a reading app that has the right fonts.

Turning your own writing into an e-book

If you write in Markdown, or in plain text, you are one step away from a real e-book. The Markdown to EPUB converter splits the document into chapters at each top-level heading, # in Markdown, or at ## if there are no top-level headings, and builds the table of contents from them. The first heading becomes the book's title. The result is a valid EPUB 3 file that also includes an EPUB 2 contents file for older readers.

A few habits make the result better:

  1. One # heading per chapter, with ## and ### inside chapters.
  2. Preview the Markdown first in a Markdown preview to catch broken lists and stray symbols before they reach the reader.
  3. Leave images out of the source, or add them afterwards in an EPUB editor. Images referenced by file paths cannot be packed into the book automatically, so they are removed rather than left as broken links.
  4. Check the language. The book is marked as English, which readers use for hyphenation and text-to-speech; for another language, change it in an EPUB editor such as Sigil before publishing.

Then send the EPUB to your Kindle, open it in Apple Books, or share it with beta readers. If someone insists on a PDF, convert it the other way, and compress the PDF if it is going by email.

Further reading

Do it hereEPUB to PDFConvert DRM-free EPUB e-books to PDF, plain text or a single HTML pageOpen

Written for NextTool. Every statement about a tool is checked against that tool's code, and corrections are dated above. How guides are written

epubebookspdfkindlemarkdown