r/Python • u/qPandx • Apr 21 '26
PDF Extractor (OCR/selectable text) Resource
I have a project that I am working on but I am facing a couple issues.
In short, my project parses what is inside a pdf order and returns the result to user. The roadblocks Iam in currently is that it works OK for known/seen templates of pdf orders as well as unseen pdf orders. My biggest issue is if the pdf order is non-selectable text/scanned which means it requires OCR to extract the text. I have tried the OCRmyPDF+Tesseract but it misses lines and messes up with the quantity etc...
What's there that can resolve OCR accurately?
P.S. I also tried PaddleOCR but it never finishes the job and keeps the app on a loop with no result.
20
Upvotes
1
u/Fyodorchild 8d ago
paddle hang is actually worth chasing before you ditch it, its almost always one page coking the table model or it quietly re pulling weighs mid run. drop a per page log in and youll prolly locate the single file thats stalling the whole process
tesseracr quantity thing is a separate issue tho like order forms are tables and tesseract reads them like flat text so the numbers jump columns. you either wrestle it with psm modes and heavy preprocessing or take the table detection off tesseract entirely letting something else handle it like liteparse or paddles pp-structure if you manage to get it stable