OCRmyPDF can create searchable PDF files on Windows using the Tesseract engine.
In the OCRmyPDF documentation, it is suggested to install Python and Tesseract via winget and to manually install the latest version of Ghostscript.
Ghostscript have a bug that causes conversion to fail. Also, the version of Tesseract suggested via winget unfortunately does not install the latest release (5.4.0 instead of 5.5.3).Therefore, I recommend the following:
Step 1:
In a command prompt (cmd.exe):
winget install -e --id Python.Python.3.14 (current version as of 08-2026)
Alternatively, download version 3.14.6 x64 for Windows or newer directly from Python: https://www.python.org/downloads/windows/
Python always stores its applications in an absolute path matching the installed Python version (e.g. C:\Users\YourUsername\AppData\Local\Programs\Python\Python314\). So if you update Python later, you will need to reinstall Tesseract and OCRmyPDF; the Python installer does not carry existing applications over to the new version directory during an update!Step 2:
Then manually download Tesseract 5.5.3 or newer from GitHub (link: https://github.com/tesseract-ocr/tesseract/releases / as of 08-2026, the current file is named tesseract-ocr-w64-setup-5.5.3.20260724.exe) and also download the German language file there: https://github.com/tesseract-ocr/tessdata_best > deu.traineddata
Tesseract includes English by default, but there are newer, more comprehensive English data files than those included in the Tesseract installer package. Therefore, also download eng.traineddata from the aforementioned location if you want to use English.
Step 3:
After downloading, install Tesseract for Windows.
Placing the language file after installation:
For a 64-bit installation, place the deu.traineddata file (and optionally the English one) in the folder C:\Program Files\Tesseract-OCR\tessdata. If you need additional languages, you must download the corresponding training data and place them there as well. Please overwrite any existing English file in the target folder.
For reference:
deu.traineddata 15,076 KB
eng.traineddata 22,917 KB
Step 4:
As mentioned above, you should currently avoid Ghostscript 10.6 or newer; version 10.5.1 does not have the bug. As of early 2026, even the latest GS versions still had the bug.
Visit this website (link: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases#release-gs10051), expand the “Assets” section under entry 10.5.1, and download the
gs10051w64.exe file, then install it.
Step 5:
Install OCRmyPDF in Python via a command prompt:
py -m pip install ocrmypdf
My practice:
I use a folder where I store scanned documents without OCR, and then run a batch file there. The batch file is a one-liner:
for /r %%f in (*.pdf) do ocrmypdf -l deu+eng --title "%%~nf" "%%f" "%%~nf - OCR%%~xf"
- All PDFs in the folder are converted to searchable PDFs according to PDF/A (this is Tesseract’s default setting).
- German and English are specified as possible languages, and
- the output files receive a suffix so that
Filename.pdfbecomesFilename - OCR.pdf.
If Python has cleanly added its paths to your PATH environment variable, you can run ocrmypdf from any CMD prompt.
tl;dr
- Install the latest Python 64-bit
(currently 3.14.6; from 3.15 onward, the Windows installer is said to be “retired”: The replacement on Windows is the Python install manager (pymanager / new py), not the old traditional EXE installer. Python.org says the install manager is now the Windows tool for installing and managing runtimes, that the traditional executable installer will stop being released with Python 3.16, and that the Microsoft Store app or the MSIX package is recommended.) - Install Tesseract 5.5.3
- Install Ghostscript 10.05.1 (versions 10.6 and 10.7 have a JPEG creation bug: “contains jpeg encoding errors that may corrupt images”)
- Install OCRmyPDF via
py -m pip install ocrmypdfin an admin CMD
In C:\Program Files\Tesseract-OCR\tessdata, place all desired language files, at minimum the deu and eng traineddata files—see download links above.
deu.traineddata 15,076 KB
eng.traineddata 22,917 KB
You can display the list of languages recognized by your installation with:
"C:\Program Files\Tesseract-OCR\tesseract" --list-langs




