PDFi-hated-pdfs.pdf
Page 1 / 7
Arick VigasCase study

ReadAnyway · PDF to EPUB

I hated PDFs with my whole heart.

I'm Arick Vigas, a software engineer and co-founder of ReadAnyway, a reading app. This is how I finally built the thing I wanted for ten years: a way to turn a PDF into a real ebook.

ReadAnyway is my own product, so the numbers here are real. Short on time?

Ten years

What is so bad about a PDF?

So many books. And I could not read them.

It started when I was a kid. I could not select the text. I always needed one more app just to open the file. For a book, that is just ridiculous.

For ten years, every book that came as a PDF was a small disappointment.

The reason is simple. A PDF fixes every page in place, like a photo of paper. On a phone the whole page shrinks, and you pinch and drag to read it.

PDFmoby-dick.pdfPage 1
Page 1 of Moby-Dick. As a PDF it is this small on a phone. Drag the glass to read it.
Two years ago

When did it start to look possible?

AI learned to read pages. And it kept getting cheaper.

AI agents had arrived too: programs that work through a task step by step. I saw my chance to finally fix this.

But I did not know how many other people had the same problem. So the idea went into our backlog, and from time to time I came back to think about how to solve it best.

Meanwhile

Had nobody solved it already?

They all said yes. They gave me back a mess.

I kept finding new PDF to EPUB converters, and reading apps with the same promise: sure, we will convert it, and for free.

So I sent them my PDFs. Back came text with page numbers, page headers and notes mixed into it. And God forbid your book has tables or pictures. You can forget about those.

And no covers. That one always felt like an insult.

One real page, three versions
IX

He opened it at the back cover and turned it around for1

me to see. On the last flyleaf was printed the word sched-ule2, and the date September 12, 1906. And underneath:

Rise from bed 6:00 a.m. Dumbbell exercise and wall-scaling 6:15 – 6:30 ” Study electricity, etc. 7:15 – 8:15 ” Work 8:30 – 4:30 p.m.3

Baseball and sports 4:30 – 5:00 ”

Practise elocution, poise and how to attain 5:00 – 6:00 ”

it

Study needed inventions 7:00 – 9:00 ”

General Resolves

14

  1. One sentence became two paragraphs.
  2. The hyphen from the end of the line stayed inside the word.
  3. The table turned into one long sentence. Then into loose lines.
  4. The page number became part of the book.
Real output from our test bench, November 2026. The free converter is Calibre 9.18, one of the best known. The page is from The Great Gatsby.
Today

Can't an AI agent just do it now?

It can. For 50 million tokens a book.

Today you can hand a PDF to an AI agent on a top model, like Opus 5.5 or Astra, and get an EPUB back.

In my last test, Astra turned a scanned book by Freud into a proper ebook. Here is what that one book took.

300pages, one scanned book
40minutes of agent work
50Mtokens, the units AI is billed in

I needed this inside our library, working by default, and as cheap as possible.

I was tired of waiting for someone to solve it once and for all. So I decided to do it myself, for myself.

Week one

How hard can it be?

This beast is hard. Really hard.

Inside, a PDF is only a list of blocks: this text here, that picture there. Often a whole page is just one picture.

It can have several layers. Hidden text. Formulas. Tables. Bad scans. And much more.

For the first week I only played with the PDFs I had, to learn how they are made. I tried every text recognition tool I could get, and looked at what each one gave back.

Three files that look the same on screen
Youwillrejoicetohearthatnodisasterhasaccompaniedthecommence-mentofanenterprisewhichyouhaveregardedwithsuchevilforebodings.

Real letters, each piece pinned to a spot on the page. Nothing says where a sentence or a paragraph begins, or that "commence-" and "ment" are one word.

Illustration of three kinds of PDF we met. Text: Mary Shelley, Frankenstein.

The same problems came back every time: hyphens, broken words, titles, page breaks, page numbers.

*The beast is the PDF: Adobe's proprietary format from 1993, an open standard only since 2008. It was built to print a page exactly the same everywhere. Turning it back into a book was never part of the plan.

Two dead ends

I started simple, and kept testing.

My first idea: read every page with a recognition tool, then hand the result to a fast language model to tidy it up. Some of it worked. A lot of new problems showed up too.

Then I gave the whole thing to Astra. I said: do whatever you want, just give me a converter that turns these PDFs into these EPUBs.

agent · pdf-to-epub
  1. Day 1
  2. Day 2
  3. Day 3
  4. $200 limit
  5. Day 4
  6. Day 5
  7. Day 6
  8. $200 limit
  9. Day 7

Day 7. Still working. Still many problems.

Illustration. The week was real. The buttons are for you.

One day. Two days. Three days. Then a whole week, and several $200 usage limits.

I understood that I had to use my own brain for this one. From then on I worked out the method myself, and agents built it one piece at a time.

PDF i-hated-pdfs.pdf EPUB

The turn

What finally worked?

A tool that says what each block is, and where it sits.

I ran experiment after experiment: Apple Vision, PaddleOCR, Mistral OCR 3 and 4.1, DeepSeek OCR, Baidu Unlimited 2, Haiku. Slowly the picture came together.

The method had to handle two kinds of PDF. Digital ones, which hold real letters. And scans, which are only photos.

Some tools give back only the text. Others, called document readers, also say where each piece sits on the page. From that you can work out what is a title and what is a paragraph.

Mistral was very neat. It adds a label to every block. Here is a title. Here is a page number. With that, a plain program can clean the page and put the book together.*Mistral OCR: the document reader from Mistral AI, a French AI company. You send it pages, and it sends back the blocks it found.

One page, five blocks
On the pageReader saysOur program does
FRANKENSTEIN
HeaderDrops it. The same words sit on top of every page.
Letter 1
TitleKeeps it as a chapter title.
You will rejoice to hear that no disaster has accompanied…
TextKeeps it. The letters are taken from the PDF.
1. Now Saint Petersburg, in Russia.
FooterKeeps it. The reader got this one wrong. It does not repeat on other pages, so it is a footnote.
12
FooterDrops it. It counts up with the pages.
Illustration with a made-up page and footnote. The labels are the kinds the reader really returns.

One more rule made it safe. In a digital PDF the letters come from the PDF itself. The AI only supplies the labels. If the two disagree, the PDF wins. So the AI cannot quietly change a word of your book.

The bench

How do I know it is right?

A bench of hard cases. Every change has to pass it.

Without a score, I could not tell if a change made the books better or worse. So I collected the hard cases and scored the converter on every one.

The trick is to use books we already know. We take public-domain classics with carefully checked text, print them to PDF ourselves, convert them back, and compare with the original letter by letter.

No other converter is the judge. Only the known text.

The hard cases · pick one

A simple converter reads straight across the page and mixes the two columns together.

99.88%of paragraphs in the right place, in our worst run. The free converter managed 29% to 87%, depending on its settings.
From our own test records, November 2026. The free converter is Calibre 9.18.
Ten test PDFs · 1,639 pages · every line counted
77,934lines in the test PDFs= 74,656lines in the finished books+ 3,278page numbers and running heads, dropped
Free converter
Ours
Wrong letters
0.28%
None
Words that came through
99.7%
99.99%
Chapter titles found
97.8%
100%
Paragraphs in the right place
86.5%
99.88%
Cut words left, per 1,000 words
1.6
None
Ours: the worst of ten runs. Free converter: Calibre 9.18 with its clean-up option on, average on the two-column pages. Five classic books from Standard Ebooks, each printed in two page designs.

The catch

So was it done?

It worked. It cost a little too much.

With Mistral I got what I wanted. But it is a paid service. A real 53-page book was ready in 38 seconds and cost 21 cents to read.

For one book that is nothing. For a library that converts every PDF by default, it adds up fast.

So I looked for ways to make it cheaper, or to run it on an ordinary computer or phone. Apple Vision was pretty nice: fast and free. But it only works on Apple devices.

Then I turned to Haiku again, a small and cheap AI model, and started to build a second reader around it.

What it costs to read one book
Your book300 pages
Mistral reader$1.20
Haiku reader, early trials$0.30 to $0.72
On your own device, planned$0
Reading cost only, at the prices we measured in November 2026: 0.4 cents a page for Mistral, 0.1 to 0.24 cents for Haiku.

The findings

What did all those experiments show?

More than 40 tools tested. Here is what we learned.

Readers, AI models and whole converters. The table keeps the ones worth knowing, good and bad, for anyone building the same thing.

Pick a filter to see only what you need.

The ones worth knowing · 23 rows
ToolOld scan, wrong lettersBook structureSpeed a pagePer 1,000 pagesVerdict
Readers you call over the internet
Mistral OCR, own APIHosted · paid0.59%10 of 10 test PDFs with our engine. A type and a box for every block3 s$4
$2 in batches
UseOur reader today.
Gemini 3.8 FlashHosted · paid0.48%Best on tables, 83% of cells. Its boxes lose blocks on two-column pages9 s$3
$5 with boxes
UseAs a second reader that checks the first.
Gemini 3.1 Pro previewHosted · paid–Text only. 0 to 0.13% wrong on 6 clean pages9–13 s$9–16MaybeThe most exact text, at three times the price or more.
GPT-5 miniHosted · paid0.53%Text only, no boxes–$2MaybeHalf the price, nearly as good on scans.
Gemini 3.5 and 3.1 Flash-LiteHosted · paid0.68%
0.79%
Text only. 3.1 got stuck repeating itself on one page–$1.60–1.70MaybeCheap plain text.
Qwen3-VLHosted · paid0.88%
(30B)
The 235B model gives the best hosted boxes: no wrong letters on a two-column test book–$0.80
(30B)
MaybeCheap, and the big one is a layout candidate.
Claude Haiku 5.5Hosted · paidRefused 2 of about 9 pagesEarly trial: 2 of 8 real pages right as returned, 5 after repair6.7 sabout $1.20TestingOur next reader. Needs a plan for refusals.
Baidu Unlimited-OCR-2Free demo on Hugging Face2 test pages: English exact, 3 Ukrainian letters wrongKept bold and italicabout 20 s$0 on the demoMaybeToo small a test to judge.
Llama 4 ScoutHosted · paid1.52%Text only. 8% wrong on English test pages, 17% on Ukrainian–$0.40AvoidToo many mistakes.
Mistral OCR through OpenRouterHosted · paid–No boxes. Changed an author's words and lost 140 of 762 words on one page3.5 s$2.20AvoidSame model, worse route.
Readers on your own computer
Apple VisionMac and iPhone · free–A box per line. Reads across columns: 42% wrong on a two-column paper0.6 s$0UseOn one-column pages: 0.12 to 0.42% wrong. Apple only.
PP-DocLayoutV2 + column sorterFree · Apache-2.0–7 of 10 test PDFs. Reads no table cells1–1.6 s on CPU$0UseThe best free layout model for digital PDFs.
DocLayout-YOLOFree · AGPL-3.0–7 of 10 test PDFs, worst run 0.77% wrong1.3 s$0MaybeWorks. Check the AGPL licence first.
PP-DocLayoutV3 + docTRFree · Apache-2.01.60%3 of 10 test PDFs3.5 s$0AvoidClassic OCR is not enough for old scans.
GLM-OCR and LightOnOCR-2Free0.25%
0.36%
on 9 pages, Mistral 0.42%
Text only40–60 s on an M4$0MaybeThe best scan readers we saw. Too slow without a GPU.
MinerU2.5-ProFree0.91%Tables as well as Mistral: 85% of cells against 82%–$0MaybeCall its library. Its command-line tool can send files to a remote service.
PaddleOCR-VL 1.6Free · Apache-2.00.92%––$0MaybeA solid open scan reader.
Marker 2.2Free0.72%––$0MaybeGood on scans. Its Surya models limit competing use.
DeepSeek-OCR-2 and olmOCR-2Free–Dropped or rewrote whole pages–$0AvoidNot for books, where every word counts.
Whole converters and shortcuts
Calibre 9.18Free · GPL-3.0Needs a text layerNo run met our targets. Two columns: 29 to 87% of paragraphs in place3.5–6 s a book$0AvoidFor PDFs. Page numbers leak and columns break.
PDF to Markdown toolsMistral's Markdown, PyMuPDF4LLM, MarkItDown–No run met our targets. Paragraphs split at page breaks, running heads stay, columns mix––AvoidMade to feed text to an AI, not to make a book.
An AI agent does it allAstra · hostedOne 300-page scan, done properly–40 min a book50 million tokens a bookAvoidAs a default. It works, but costs far too much.
An AI retypes every pageOur first engine · hostedFailed the one real scanned book we gave it–12 sabout $30AvoidSlow, costly, and it can change words.
From our own runs, November 2026. Different tests used different pages, so compare within a column with care. Old scan: 19 pages of an 1897 Dracula, punctuation and capitals not counted. Book structure: how many of our 10 test PDFs met every target. Speeds on a busy Apple M4 or the provider's servers. Docling is left out: a bug in how we fed it was found in review, and its numbers are withdrawn.

Nine things the table taught us

Use the provider's own API.

The same Mistral model through a reseller changed an author's words and lost 140 words on one page. Through Mistral's own API it did neither.

Ask for boxes, not only text.

Without a type and a position for each block, you cannot tell a footnote from a page number.

Digital PDFs can be free.

A layout model on a laptop CPU met every target on 7 of 10 test PDFs, at about 1.5 seconds a page.

Scans still need a vision model.

Classic OCR got 1.6% of letters wrong on an old scan. Vision models got 0.25 to 0.9%.

Markdown is not a book.

No PDF-to-Markdown tool met our targets as it is. Paragraphs split at page breaks, running heads stayed, columns mixed.

Read the licence first.

DocLayout-YOLO is AGPL. Marker's Surya models limit competing use. Find out before you build on them.

Check where local tools send files.

MinerU's command-line tool can send documents to a remote service. We called its library directly.

Plan for refusals.

Haiku's content filter blocked 2 of about 9 pages of Dracula. Retries and a fallback reader are part of the design.

A GPU pays off only at volume.

By our estimate, a rented GPU server beats paying per page somewhere between 60,000 and 125,000 pages a month.

Into the app

How does it live inside the product?

A small core, with workers around it.

The core is the converter itself. A PDF goes in, an EPUB comes out, and it knows nothing about users or money.

The workers take jobs from RabbitMQ, the queue our app already uses for slow work. If more people need conversions, we start more workers, and the core stays the same.

Each page we pay an AI to read is written to our wallet ledger, so we always know what a book cost.

Your PDF→Queue→PDF worker cuts it into small pieces→→Program builds the book→EPUB in your library
Illustration. The path of one book.

For anyone doing this

What would I tell a team starting today?

  • Give an agent one small piece at a time, with a test it must pass.
  • Build the test bench before the converter.
  • Use books you already know as the truth.
  • Keep every paid answer. Never pay twice.