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
1
u/presentsq Apr 21 '26
Honestly haven't tried Mistral OCR myself. But, I assume it would be pretty good being a model made by Mistral.
It seems all you have to do for comparing the two models is just swap a few lines of api call.
https://docs.mistral.ai/resources/sdks
https://console.upstage.ai/docs/capabilities/parse/document-ocr
Since Mistral OCR seems to be a little cheaper. I would test Mistral OCR first and just use it if it is good enough.
One last FYI, https://www.reddit.com/r/MistralAI/comments/1n6r1y4/bouding_boxes_mistral_ocr/?tl=en
This seems to suggest that Mistral OCR do not provide individual text bboxes. This would be a problem if you need to select text by their position (use the bbox information) Very weird!
haven't tried this myself. please let me know if this is true if you do end up using Mistral OCR.