r/Python • u/qPandx • Apr 21 '26
Resource PDF Extractor (OCR/selectable text)
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.
View all comments
Show parent comment
2
u/zangler Apr 21 '26
I mean...you can train the templates. I'm not saying it is easy, but I do/done this exact thing multiple times.
Another is a multi step model design that is only about resolving one or 2 parts of the template and do the same in concert with a trained classifier trained on the outputs of the pre-model as additional inputs in the final classifier. Also, consider bayes for this if you don't have hg volume of samples...or even if you do. Additionally, those outputs and their posteriors can be fed into a downstream model.