Show HN: FixPDFs – Automatic PDF correction for document scans (fixpdfs.com)
The problem I have is that lots of the PDFs I read are bad scans. I scan book chapters and have a double page spread. I get scanned chapters and articles from my interlibrary-loan office that don't even have consistent page size (on my iPad, this means I have to work to prevent lateral movement while scrolling). Often these PDFs don't have OCR either (but this is becoming less of a problem). Even some of the PDFs I download from JSTOR have these issues.
Initially I used a series of tools to split pages, crop them, auto-rotate, delete blank pages, and add OCR. To be honest, some of these tools (like tesseract!) are amazing. Some of these problems are not easy to solve, though, especially removing random border/margin noise while retaining page numbers. And, although Tesseract does a pretty good job of English, German, and French text, I have not had as much success with Greek and Hebrew.
So I built https://fixpdfs.com: A tool that wraps all this functionality up into an automatic fixer-upper for document scans.
What FixPDFs does:
- Splits double page spreads and removes blanks pages along the way
- Binarizes pages and reduces noise, reducing file size too—bonus!
- Rotates pages to be "more vertical"
- Normalizes page size
- Adds OCR using Google's Vision API (until Google kills that...)
What it doesn't do: - Unwarp your pages. FixPDFs rotates pages, but it can't normalize their curvature or unfold them.
- Make images look good in black and white. Binarizing plain text is hard enough, doing a good job with images as well was a bridge too far for me at this point. Suggestions for handling this are welcome.
- Identify mathematical formulae. I never need to run this kind of thing on papers with any maths, because the chronological snobbery is strong in STEM.
My stack is: - Frontend: React SPA (with Tailwind and Vite) hosted on CF pages
- Backend: Supabase for auth and file metadata, CF workers + R2 for storage and backend functions. The actual processing is done in a docker image (python opencv + fastai) hosted in my homelab, which I figure will be easy to scale if necessary, but at this point it just processes a single file at a time.
- Subscriptions: Stripe
Suggestions welcome!
0 comments
[ 2.3 ms ] story [ 13.1 ms ] threadNo comments yet.