PDF OCR Converter is calibre's own PDF Input with OCR for scanned PDFs.
A PDF with a text layer goes through calibre's normal PDF conversion, so the result is the same as without the plugin. A scanned PDF without a text layer goes to OCR, and calibre's own reflow then makes the paragraphs from the OCR lines.
The OCR runs during the conversion (for example PDF to EPUB). The plugin does not change the PDF in your library. Thus it differs from GUI plugins such as OCRthisPDF, which add a text layer to the PDF with OCRmyPDF.
Main features- Two OCR engines. Tesseract (default; best accuracy for Latin-script languages) or PDFOxide with PaddleOCR models (better for non-Latin scripts such as Cyrillic, Greek, Arabic, Chinese and Thai).
- Tesseract fast or best models. The plugin downloads the language model of the book language from tessdata_fast or tessdata_best.
- On Windows, nothing to install. If Tesseract 5.5 or newer is not installed, the plugin downloads a portable Tesseract once (about 40 MB). On macOS and Linux, install Tesseract with your package manager; no language packages are necessary.
- Paragraphs, not lines. The plugin puts the text of all pages at the same margin and indent, so calibre joins the lines of a paragraph. Few type sizes: body text, small text and up to three heading sizes.
- Force OCR for a PDF with a bad text layer. With Tesseract, the text layer only fills lines that OCR did not read (for example underlined headings) and repairs some OCR words.
- Word repairs after OCR with an installed spelling dictionary: paragraphs split inside a sentence at a page break, words split at a line end, merged words such as "Arjis" for "Ar jis". Only clear cases change; names stay.
- Optional autocorrect with the spelling dictionary (recommended for PDFOxide, which often loses marks such as ą or é).
- A quality check in the conversion log: paragraphs that end inside a sentence, unknown words, and advice when a number is bad.
Results on our test books (Lithuanian books with an EPUB of the same book as the reference)
- 65 pages from 14 books: character error rate 4.6 % with Tesseract and the plugin's repairs, 7.8 % with PDFOxide, 7.7 % for the text layer of the same PDFs.
- A 364-page scanned book with Force OCR: about 96 s on a 14-thread Windows PC.
Installation- Download the zip below. In calibre: Preferences > Plugins > Load plugin from file, and select the zip.
- Restart calibre.
- Convert a PDF as usual. The OCR options are in Convert > PDF OCR input, in the group "OCR".
The plugin replaces calibre's PDF Input for PDF files. To go back, disable or remove the plugin.
What the plugin downloads, and from where
Everything is pinned with a SHA-256 in the plugin zip and is checked before use. Downloads go into the plugin folder of the calibre settings (pdf_ocr_deps).
- Tesseract language models: GitHub, tesseract-ocr/tessdata_fast or tessdata_best.
- Windows only, if Tesseract 5.5 or newer is not installed: a portable Tesseract 5.5.5, built by the official Tesseract Windows build with one added step that makes a ZIP (github.com/andriusval/tesseract releases; upstream pull request tesseract-ocr/tesseract#4738).
- PDFOxide engine only: the pdf_oxide wheel from PyPI and the PaddleOCR models from HuggingFace.
- Autocorrect only: a missing spelling dictionary from the LibreOffice dictionaries, with calibre's own download function.
Options (also on the command line of ebook-convert)
- --pdf-ocr-engine tesseract | tesseract_best | pdf_oxide
- --pdf-ocr-language auto | an ISO 639-1 code such as de, lt or ru
- --pdf-ocr-force-ocr
- --pdf-ocr-keep-illustrations (searchable PDFs, calibre 9.19 and older)
- --pdf-ocr-autocorrect
Requirements
calibre 7.20 or newer; the PDFOxide engine needs calibre 9.0 or newer. calibre 9.20 or newer is recommended, because its PDF reflow joins the lines of a paragraph better. Tested with calibre 9.19 and 9.20 on Windows 11, and with calibre 7.20, 8.8, 9.0, 9.15, 9.16, 9.19 and 9.20 on Linux (x86_64). Not tested on macOS yet.
On Linux and macOS, install Tesseract 5.5 or newer with the package manager (Homebrew on macOS). Ubuntu 24.04 has only 5.3; it works, but 5.5 reads more lines.
Known issues- The Tesseract book has only the text; illustrations of the scanned pages are not in it.
- PDFOxide cannot yet do Force OCR on a PDF with a text layer; such a PDF goes to calibre's conversion (support will be added in the next version).
- Word repairs and autocorrect need an installed spelling dictionary of the book language (if selected will download automatically).
Reporting a problem
Please attach the conversion log (Jobs > Show job details). The plugin writes a report at its end: the versions, the options, the OCR engine and models, the times and the quality check. It has no book title, author or folder path.
Source and license
Source:
https://github.com/andriusval/calibre-pdf-ocr
License: GPL v3, the same as calibre.
Version History