-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sandwich pdf-rederer is not working. Getting gibberish text from output PDF. #17
Comments
The text found in the PDF is precisely what EasyOCR detected in this case, so it must be struggling to make sense of the multiple colors and formatting. From the debug log, the gibberish is coming directly from EasyOCR:
That's a fantastic test image. Please report the issue to EasyOCR to see if they will address it. Regular OCRmyPDF with Tesseract seems to work okay-ish. |
@jbarlow83 I'm not sure about this tool how it's using the easyocr under the hood. But below is what I got when I ran easyocr separately on this image. OCR is giving correct results on this image. |
@jbarlow83 |
Set language to English. ocrmypdf.ocr(os.path.join(save_path, "input.pdf"), os.path.join(save_path, "output.pdf"), force_ocr=True, pdf_renderer="sandwich", language="eng") |
Hi, Even after using
--pdf-renderer=sandwich
option; getting gibberish text when I select the text from output pdf and paste somewhere.FYI: I'm using
MacOS(M1) 15.0.1
Below are the steps I took.
pip install git+https://github.com/ocrmypdf/OCRmyPDF-EasyOCR.git
ocrmypdf --pdf-renderer sandwich image.pdf test.pdf
Version info:
Below are logs:
I'm attaching the PDF file I tested with.
image.pdf
ouput.pdf
I also tried processing image version of this PDF, this isn't working too.
command:
ocrmypdf --pdf-renderer=sandwich --force-ocr --image-dpi 300 image.jpg test.pdf
image
The text was updated successfully, but these errors were encountered: