Prompt
Why is OCR returning empty text on scanned PDFs?
Latest observation
Nov 14, 2026
OpenAI APIWeb search: off
OCR can return empty text on scanned PDFs for a few common reasons:
-
The PDF is image-only, but OCR wasn’t actually run
- Many “scanned PDFs” are just images embedded in a PDF container.
- If your pipeline expects embedded text, it may return nothing unless you explicitly run OCR.
-
The scan quality is too poor
- Low resolution, blur, skew, noise, faint text, shadows, or compression artifacts can make characters unreadable.
- OCR engines often fail silently by returning little or no text.
-
The page is blank or nearly blank
- Some scanned documents have separator pages, blank pages, or extremely faint content.
-
The text is rotated, upside down, or oddly oriented
- If orientation detection isn’t enabled, OCR may not detect anything useful.
-
Wrong language or missing OCR language model
- If the document language isn’t configured, OCR accuracy can drop dramatically.
-
The PDF pages are not being rasterized correctly
- OCR usually needs page images. If conversion from PDF to image fails or produces very low DPI images, OCR can return empty output.
-
The text is in a region the OCR engine ignores
- Margins, columns, stamps, handwriting, watermarks, or small text may be skipped depending on settings.
-
The PDF already contains a hidden text layer that is malformed
- Some scanned PDFs have an invisible OCR layer, but it can be broken or empty, and your extractor may rely on that instead of the image.
What to check
- Open the PDF and confirm whether you can select/copy text.
- Convert a page to an image and inspect its clarity.
- Try OCR on a single page at high DPI, like 300 or 400.
- Enable orientation detection and the correct language.
- Preprocess the image: deskew, denoise, increase contrast, sharpen.
- Check whether your library is using embedded text extraction instead of OCR.
If you want, I can help you debug a specific OCR pipeline or library and show how to diagnose which of these is happening.