Open david-sledge opened 2 weeks ago
The problem with this file is that does not embed the fonts it uses. In this case, Arial Bold and Arial Bold Italic. It was previous processed by Nitro Pro 13.
When Ghostscript (which OCRmyPDF uses), it replaces the missing with a substitute, using "DroidSansFallback". The kerning of the substitute is different, so the PDF viewer sees spaces between letters. At least for me. I don't know how an Asian font was substituted in your version.
ocrmypdf --output-type pdf
avoids Ghostscript, and produces a usable result.
Try doing
gs -sDEVICE=pdfwrite -o output.pdf test.pdf
and see if you can reproduce the Japanese-Korean version, then reporting to Ghostscript. I won't report because there's potentially personal information in the test file that is not mine.
ocrmypdf --force-ocr
would also fix this file completely, with or without Ghostscript.
I am considering adding a warning about Ghostscript font substitution, especially if someone else encounters this. Ghostscript has had several issues with mangling text recently.
I think i have got the same problem
I am running with --redo-ocr also and this hieroglyphs appeas sometimes
Describe the bug
Found an issue with certain PDFs that already have text where the text is replaced with other characters and renders the PDFs unreadable. This happens with the
--redo-ocr
and--skip-text
flags. Attached are (a) a sample PDF (b) the results of it being OCRed, and (c) a zip file containing everything needed to reproduce the issue.Steps to reproduce
Files
test.pdf test-redo-ocr-result.pdf test-skip-text-result.pdf bad-pdf-example.tar.gz
How did you download and install the software?
Linux package manager (apt, dnf, etc.), Docker container
OCRmyPDF version
16.3.1
Relevant log output