Readwyn 0.1.0

Read a PDF book as reflowable text on a Mac

Once a PDF is in your Readwyn library, “Read” on its book screen opens it as reflowable text. Readwyn converts the PDF to EPUB 3 as it adds the book, so the reader can set the text as ordinary pages in the font and size you choose, at the width of your window. The PDF itself stays in the library, untouched.

Opening it

Click “Add books”, or drag the PDF from Finder onto the window. On the book screen, “Read” (“Continue reading” once you've started) opens the converted text. In the Details tab, “Files” lists the PDF as “Original” and the EPUB 3 as “For reading”.

A two-page spread in the reader, with a passage selected and the four highlight colours above it
A book in the reader. A converted PDF reads the same way.

From then on the reader treats the book like any other EPUB. Change the font or size in the Text panel and the pages reflow to fit. A window at least 1000 px wide shows two pages side by side, unless Settings › Reading is set to “Always one page”; a narrower one shows a single page. In an English book, a word that doesn't fit at the end of a line is hyphenated between syllables. The footer shows your page, the percent read and the time left in the chapter.

Taking the page apart

A PDF pins every line to a fixed spot on the page, so the conversion has to work out what the lines were:

  • Running headers, running footers and page numbers are dropped. A page number in brackets, which marks a page of the printed edition, stays where the page broke.
  • Lines are joined into paragraphs, across page breaks and across columns. A page set in two columns reads one column, then the other.
  • A word split by a hyphen at the end of a line becomes one word again, unless the book uses the hyphenated form elsewhere and never the joined one, or the second half starts with a capital.
  • A footnote at the bottom of a page moves to the end of the paragraph that the page break interrupted, so it doesn't land in the middle of a sentence.
  • A line whose parts are more than two ems apart becomes a table row.

Italic, bold, superscripts and subscripts survive, and so do the headings and the images (apart from JPEG 2000 and JBIG2 images). The table of contents comes from the PDF's outline, or from its headings if it has no outline. Links inside the book still work.

Tested on 50 PDFs

The conversion was tested on 50 PDFs from Project Gutenberg, each compared with the EPUB 3 edition of the same book. Across all 50, the word error rate (words that are wrong, missing or extra) was 9.15%, and the mean paragraph-break F1 score was 0.753. In the 42 books with headings, 91% of the reference headings came out as headings on average.

On the test Mac, converting one book at a time, half the books took a hundredth of a second or less, and all but one took under a tenth. The slowest, a Portuguese dictionary of 2,164 pages, took 0.45 seconds. Convert PDF to EPUB without calibre has every measure and the baseline.

Scans and encrypted PDFs

There's no OCR, so a scanned PDF with no text layer won't convert, and nor will an encrypted one. The book then keeps just the PDF. Its book screen shows “Open” instead of “Read”, which opens the PDF in its default app; the “…” menu names that app.

On a Kobo

“Send to device” sends the converted EPUB 3 to a Kobo, as a KEPUB if “Convert EPUB to KEPUB for Kobo e-readers” is on.