How to measure
- Chose
- Print known books to PDF, convert them back, compare with the original letter by letter.
- Rejected
- Comparing with other converters, or trusting a public ranking.
- Why
- Another tool's output is an opinion. A known text is a fact.
ReadAnyway · PDF to EPUB
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?
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.
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.
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.
| 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. |
| Baseball and sports | 4:30–5:00 | ” |
| Practise elocution, poise and how to attain it | 5:00–6:00 | ” |
| Study needed inventions | 7:00–9:00 | ” |
The page as printed. A word is cut at the end of a line, there is a small table, and a page number sits at the bottom.
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
He opened it at the back cover and turned it around for me to see. On the last flyleaf was printed the word schedule, 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. |
| Baseball and sports | 4:30–5:00 | ” |
| Practise elocution, poise and how to attain it | 5:00–6:00 | ” |
| Study needed inventions | 7:00–9:00 | ” |
General Resolves
A spoiler from later in this story. One paragraph, a real table, the word whole again, no page number.
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.
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.
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.
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.
No letters at all. It is a photo of paper. A program has to read it the way you do.
A photo, plus a guess that an old scanner program hid under it. You cannot see the guess, and it is wrong. A converter that trusts it ruins the book.
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.
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.
Day 7. Still working. Still many problems.
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
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 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
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.
A simple converter reads straight across the page and mixes the two columns together.
"sched-ule". A word cut at the end of a line has to be joined again. But some hyphens are real, like "well-known".
A paragraph that runs on to the next page or the next column has to become one paragraph again.
Page numbers and the book title on top of every page are not part of the book.
A table has to stay a table, with every cell in its row and column.
Pictures have to stay where they were in the text.
The AI reader calls most footnotes a "footer", the part you throw away. They have to be kept.
A book without a cover does not look like a book.
A scan has no letters to take, so the reader's text is all we have. This is the weakest case.
The catch
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.
The findings
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.
| Tool | Old scan, wrong letters | Book structure | Speed a page | Per 1,000 pages | Verdict |
|---|---|---|---|---|---|
| Readers you call over the internet | |||||
| Mistral OCR, own APIHosted · paid | 0.59% | 10 of 10 test PDFs with our engine. A type and a box for every block | 3 s | $4 $2 in batches | UseOur reader today. |
| Gemini 3.8 FlashHosted · paid | 0.48% | Best on tables, 83% of cells. Its boxes lose blocks on two-column pages | 9 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 pages | 9–13 s | $9–16 | MaybeThe most exact text, at three times the price or more. |
| GPT-5 miniHosted · paid | 0.53% | Text only, no boxes | – | $2 | MaybeHalf the price, nearly as good on scans. |
| Gemini 3.5 and 3.1 Flash-LiteHosted · paid | 0.68% 0.79% | Text only. 3.1 got stuck repeating itself on one page | – | $1.60–1.70 | MaybeCheap plain text. |
| Qwen3-VLHosted · paid | 0.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 · paid | Refused 2 of about 9 pages | Early trial: 2 of 8 real pages right as returned, 5 after repair | 6.7 s | about $1.20 | TestingOur next reader. Needs a plan for refusals. |
| Baidu Unlimited-OCR-2Free demo on Hugging Face | 2 test pages: English exact, 3 Ukrainian letters wrong | Kept bold and italic | about 20 s | $0 on the demo | MaybeToo small a test to judge. |
| Llama 4 ScoutHosted · paid | 1.52% | Text only. 8% wrong on English test pages, 17% on Ukrainian | – | $0.40 | AvoidToo many mistakes. |
| Mistral OCR through OpenRouterHosted · paid | – | No boxes. Changed an author's words and lost 140 of 762 words on one page | 3.5 s | $2.20 | AvoidSame 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 paper | 0.6 s | $0 | UseOn 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 cells | 1–1.6 s on CPU | $0 | UseThe best free layout model for digital PDFs. |
| DocLayout-YOLOFree · AGPL-3.0 | – | 7 of 10 test PDFs, worst run 0.77% wrong | 1.3 s | $0 | MaybeWorks. Check the AGPL licence first. |
| PP-DocLayoutV3 + docTRFree · Apache-2.0 | 1.60% | 3 of 10 test PDFs | 3.5 s | $0 | AvoidClassic OCR is not enough for old scans. |
| GLM-OCR and LightOnOCR-2Free | 0.25% 0.36% on 9 pages, Mistral 0.42% | Text only | 40–60 s on an M4 | $0 | MaybeThe best scan readers we saw. Too slow without a GPU. |
| MinerU2.5-ProFree | 0.91% | Tables as well as Mistral: 85% of cells against 82% | – | $0 | MaybeCall its library. Its command-line tool can send files to a remote service. |
| PaddleOCR-VL 1.6Free · Apache-2.0 | 0.92% | – | – | $0 | MaybeA solid open scan reader. |
| Marker 2.2Free | 0.72% | – | – | $0 | MaybeGood on scans. Its Surya models limit competing use. |
| DeepSeek-OCR-2 and olmOCR-2Free | – | Dropped or rewrote whole pages | – | $0 | AvoidNot for books, where every word counts. |
| Whole converters and shortcuts | |||||
| Calibre 9.18Free · GPL-3.0 | Needs a text layer | No run met our targets. Two columns: 29 to 87% of paragraphs in place | 3.5–6 s a book | $0 | AvoidFor 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 · hosted | One 300-page scan, done properly | – | 40 min a book | 50 million tokens a book | AvoidAs a default. It works, but costs far too much. |
| An AI retypes every pageOur first engine · hosted | Failed the one real scanned book we gave it | – | 12 s | about $30 | AvoidSlow, costly, and it can change words. |
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.
Without a type and a position for each block, you cannot tell a footnote from a page number.
A layout model on a laptop CPU met every target on 7 of 10 test PDFs, at about 1.5 seconds a page.
Classic OCR got 1.6% of letters wrong on an old scan. Vision models got 0.25 to 0.9%.
No PDF-to-Markdown tool met our targets as it is. Paragraphs split at page breaks, running heads stayed, columns mixed.
DocLayout-YOLO is AGPL. Marker's Surya models limit competing use. Find out before you build on them.
MinerU's command-line tool can send documents to a remote service. We called its library directly.
Haiku's content filter blocked 2 of about 9 pages of Dracula. Retries and a fallback reader are part of the design.
By our estimate, a rented GPU server beats paying per page somewhere between 60,000 and 125,000 pages a month.
Into the app
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.
For anyone doing this
The brief · ReadAnyway
The converter takes the letters from the PDF and only the labels from an AI. A test bench of known books proves the result. On ten test PDFs it gets every letter right.
Free converters mix page numbers into the text and lose tables and covers. An AI agent does it well, but one 300-page scan took 40 minutes and 50 million tokens.
Tested more than 40 readers, models and converters. Chose a reader that returns a label and a position for every block. Built a bench of hard cases, then the converter against it.
1,639 test pages without a wrong letter. A real 53-page book converts in 38 seconds for 21 cents.
Tables are harder: 421 of 430 cells came out right.
Four tools got our "Use" verdict: Mistral OCR through its own API as the main reader, Gemini 3.8 Flash as a second reader that checks the first, Apple Vision for one-column pages on Apple devices, and PP-DocLayoutV2 as a free layout model for digital PDFs.
Scans are weaker: 0.59% of characters wrong on a scanned Dracula. Formulas are not built. Mistral is too costly for a default feature, so a cheaper Haiku reader is in trials and free on-device versions are planned. The test books also helped build the converter, so a public benchmark needs fresh ones.
Build the bench first. I lost weeks on attempts I could not measure. Once I could measure, a converter I could trust took days.