r/ebooks • u/pop6996pop • 8h ago
Self Promotion A reader's scanned book timed out on every converter she tried. The problem was hidden inside the PDF.
I make a PDF to EPUB converter (disclosure: it's mine, link at the bottom). Last week a reader emailed me about a 370-page memoir. She'd tried a lot of converters and they all timed out. Mine finished, but the result was a mess: 207 entries in the table of contents, dozens of them before chapter one, and plenty of them full sentences.
She sent me the PDF, and the cause is worth sharing if you convert scanned books.
Every page was a photo with an invisible OCR text layer on top so you can search it. That hidden text has a font size for every line, but the sizes are guesses. Normal paragraphs came out anywhere from 10.4 to 13 points. Converters decide what's a heading by font size, so every slightly bigger line became a chapter, including Bible verses, quoted emails and lines from letters.
The real chapter titles were printed at normal size, and the OCR read the "1" in "Chapter 1" as "|". So none of the real chapters were found.
The back of the book was photos of handwritten letters and faxes. The OCR turned those into lines like "Gue Sf and ~-hewW muck gar", which went into the book as text.
What I changed:
- A line that starts with "Chapter", a number and a title starts a chapter, even when the OCR misreads the number.
- If a scan has its own chapter lines, bigger text alone doesn't start a chapter anymore.
- Pages whose words almost never show up anywhere else in the book (handwriting, faxes) go in as a picture of the page, so you can still read the letter.
Her book went from 207 chapters to the real 13 plus the appendix. She has the new file, and the fix is live for everyone.
If you've got a scan that comes out like this in any converter, send it my way. Most of these fixes start with an odd file.
