OCRmyPDF

Из публичных источников

OCRmyPDF — открытый инструмент командной строки, который добавляет текстовый слой OCR в сканированные PDF-файлы и делает их доступными для поиска.

CLI-инструментКатегория: Инструменты разработчикаOpen sourceданные проверены 15 окт. 2026 г.

Обзор

Сканированные PDF представляют собой изображения, поэтому их текст нельзя найти, выделить или скопировать. OCRmyPDF решает эту проблему, добавляя под изображением каждой страницы текстовый слой OCR. Для распознавания используется движок Tesseract, поддерживающий более 100 языков. Текст размещается точно под изображением, исходное разрешение картинок сохраняется, а результат может быть проверенным PDF/A, что подходит для долгосрочного хранения. Инструмент является CLI, который можно использовать в скриптах. Он поддерживает несколько языков, исправление поворота страниц, выравнивание перекошенных сканов, очистку изображений, изменение метаданных и параллельную обработку на всех ядрах процессора. На вход принимаются также изображения, а файл можно обрабатывать на месте. Плагины позволяют заменить движок Tesseract, например, на EasyOCR или PaddleOCR. OCRmyPDF предназначен для архивистов, пользователей систем управления документами и разработчиков, которые пакетно обрабатывают сканы. Он работает в Linux, Windows, macOS и FreeBSD, доступен в виде Docker-образа и распространяется по лицензии MPL-2.0."},"uz":{"short_description":"OCRmyPDF — skanerlangan PDF fayllarga qidiriladigan OCR matn qatlamini qoʻshadigan, ochiq kodli buyruq satri vositasi.","long_description":"Skanerlangan PDF fayllar tasvir boʻlgani uchun ularning matnini qidirib boʻlmaydi, belgilab boʻlmaydi yoki nusxalab boʻlmaydi. OCRmyPDF har bir sahifa tasviri ostiga OCR matn qatlamini qoʻshib, bu muammoni hal qiladi. Matnni tanish uchun Tesseract dvigatelidan foydalanadi, u 100 dan ortiq tilni qoʻllab-quvvatlaydi. Matn tasvir ostida aniq joylashtiriladi, asl tasvir oʻlchami saqlanadi, natija esa tekshirilgan PDF/A boʻlishi mumkin, bu uzoq muddatli arxivlash uchun mos. Vosita skriptlarda ishlatiladigan CLI boʻlib, bir nechta til, sahifa aylanishini tuzatish, egri skanerlarni tekislash, tasvirlarni tozalash, metama'lumotlarni oʻzgartirish va barcha CPU yadrolarida parallel ishlashni qoʻllab-quvvatlaydi. Kirish sifatida tasvirlar ham qabul qilinadi va fayl joyida qayta ishlanishi mumkin. Plaginlar Tesseract dvigatelini EasyOCR yoki PaddleOCR kabi muqobillar bilan almashtirishga imkon beradi. OCRmyPDF arxivchilar, hujjatlarni boshqarish tizimi foydalanuvchilari va skanerlangan hujjatlarni ommaviy qayta ishlaydigan dasturchilar uchun moʻljallangan. U Linux, Windows, macOS va FreeBSD da ishlaydi, Docker tasvirida mavjud va MPL-2.0 litsenziyasi ostida tarqatiladi."}}
  • image-processing
  • ocr
  • pdf
  • python
  • tesseract

Установка

Команды только показываются, маркетплейс их не выполняет. Сверяйтесь с официальной документацией.
  • Файлы официального релизаИз публичных источниковиз последнего официального релиза
    github.com/ocrmypdf/OCRmyPDF/releases/tag/v17.13.0 ↗
  • Реестр пакетов языкаpythonИз публичных источниковиз манифеста пакета — публикация в реестре не проверена
    pipx install ocrmypdf

    Не проверено: перед установкой убедитесь, что пакет в реестре принадлежит этому проекту.

    pypi.org/project/ocrmypdf/ ↗
  • Сборка из исходниковИз публичных источниковиз метаданных каталога

    Сборка из исходников: проверенного рецепта сборки нет — следуйте инструкциям репозитория.

    github.com/ocrmypdf/OCRmyPDF ↗

Совместимость

«Неизвестно» значит, что доказательств не найдено, а не что продукт несовместим.
ПлатформаСтатусАрхитектураДоказательствоУверенность
WindowsНеизвестно———
macOSНеизвестно———
LinuxНеизвестно———
Container (OCI)Неизвестно———
PythonСовместимо—официальная сборка в релизе v17.13.0: ocrmypdf-17.13.0-py3-none-any.whl0.60

Релизы

проверено 29 окт. 2026 г.
v17.13.0Последний28 сент. 2026 г.Официальный источник ↗

Файлы версии 17.13.0

Маркетплейс не хранит эти файлы: загрузка идёт из официального источника. Мы их не сканировали.
ФайлПлатформаРазмерSHA-256Скачать из официального источника
ocrmypdf-17.13.0-py3-none-any.whlpython · wheel548,7 KBf4d226f361c4…Официальный источник ↗
ocrmypdf-17.13.0.tar.gzНеизвестно7,3 MB151c35d810eb…Официальный источник ↗
ocrmypdf-17.13.0-py3-none-any.whl.sigstore.jsonподпись10,9 KB2c240f67ef9f…Официальный источник ↗
ocrmypdf-17.13.0.tar.gz.sigstore.jsonподпись10,9 KB422be482b8ae…Официальный источник ↗

История релизов

Профиль качества

алгоритм quality-v1.0 · оценено 15 окт. 2026 г.
Оценка качества100
Оценка риска0
Уверенность 1.00
Оценка качества и оценка риска — разные показатели. Высокое качество не гарантирует безопасность.

Составляющие оценки

Поддержка · 2020
last activity 4 days ago
Документация · 1515
README 9993 chars, description present
Готовность к использованию · 1515
install instructions: yes; releases: yes
Метаданные · 1010
4/4 of description, homepage, license, topics
Релизы · 1010
10 release(s), latest 17 days ago
Точность категории · 1010
classifier confidence 1
Популярность · 1010
35039 stars (log-dampened, 10k = max)
Ясность лицензии · 55
SPDX MPL-2.0
Сообщество · 55
issues enabled, 2426 forks

Лицензия

MPL-2.0
Лицензия известнапо данным хостинга репозитория

Это статус политики каталога, а не юридическое заключение.

Источники

github.com/ocrmypdf/OCRmyPDFОсновной★ 35 039 звёздактивность 12 окт. 2026 г.Основной репозиторий · Уверенность 1.00

Отзывы

Войдите, чтобы написать отзыв

Отзывов пока нет.

Альтернативы

reflexПохожий
🕸️ Веб-приложения на чистом Python 🐍Apache-2.0 · Инструменты разработчика
marimoПохожий
Реактивный блокнот для Python — воспроизводимые эксперименты, запросы на SQL, запуск как скрипта, развёртывание как приложения и контроль версий с git. Хранится как чистый Python. Всё это в современном редакторе с поддержкой ИИ.Apache-2.0 · Инструменты разработчика
streamlitПохожий
Streamlit — быстрый способ создавать и делиться приложениями для работы с данными.Apache-2.0 · Инструменты разработчика
CoreCoderПохожий
Минимальный ИИ-агент для программирования (около 1000 строк на Python), вдохновлённый Claude Code. Работает с любой LLM. Что-то вроде NanoGPT для агентов программирования. Ранее назывался NanoCoder.MIT · Инструменты разработчика
iiiПохожий
Легко создавайте, расширяйте и отслеживайте все сервисы в реальном времени впервые.Инструменты разработчика
codex-keysmithПохожий
Версионное развёртывание инструкций Codex с предварительным просмотром, манифестами владения, изоляцией хуков, оценкой сценариев и восстановлением.MIT · Инструменты разработчика

README

Из ocrmypdf/OCRmyPDF · лицензия MPL-2.0 · загружено 29 окт. 2026 г.

[Build Status] [PyPI version] [Homebrew version] [ReadTheDocs] [Python versions]

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted.

ocrmypdf                      # it's a scriptable command line program
   -l eng+fra                 # it supports multiple languages
   --rotate-pages             # it can fix pages that are misrotated
   --deskew                   # it can deskew crooked PDFs!
   --title "My PDF"           # it can change output metadata
   --jobs 4                   # it uses multiple cores by default
   --output-type pdfa         # it produces PDF/A by default
   input_scanned.pdf          # takes PDF input (or images)
   output_searchable.pdf      # produces validated PDF output

See the release notes for details on the latest changes.

Main features

  • Generates a searchable PDF/A file from a regular PDF
  • Places OCR text accurately below the image to ease copy / paste
  • Keeps the exact resolution of the original embedded images
  • When possible, inserts OCR information as a "lossless" operation without disrupting any other content
  • Optimizes PDF images, often producing files smaller than the input file
  • If requested, deskews and/or cleans the image before performing OCR
  • Validates input and output files
  • Distributes work across all available CPU cores
  • Uses Tesseract OCR engine to recognize more than 100 languages
  • Keeps your private data private.
  • Scales properly to handle files with thousands of pages.
  • Battle-tested on millions of PDFs.

For details: please consult the documentation.

Motivation

I searched the web for a free command line tool to OCR PDF files: I found many, but none of them were really satisfying:

  • Either they produced PDF files with misplaced text under the image (making copy/paste impossible)
  • Or they did not handle accents and multilingual characters
  • Or they changed the resolution of the embedded images
  • Or they generated ridiculously large PDF files
  • Or they crashed when trying to OCR
  • Or they did not produce valid PDF files
  • On top of that none of them produced PDF/A files (format dedicated for long time storage)

...so I decided to develop my own tool.

Installation

Linux, Windows, macOS and FreeBSD are supported. Docker images are also available, for both x64 and ARM.

Operating systemInstall command
Debian, Ubuntuapt install ocrmypdf
Windows Subsystem for Linuxapt install ocrmypdf
Fedoradnf install ocrmypdf
macOS (Homebrew)brew install ocrmypdf
macOS (MacPorts)port install ocrmypdf
macOS (nix)nix-env -i ocrmypdf
LinuxBrewbrew install ocrmypdf
FreeBSDpkg install py-ocrmypdf
OpenBSDpkg_add ocrmypdf
Ubuntu Snapsnap install ocrmypdf

For everyone else, see our documentation for installation steps.

Languages

OCRmyPDF uses Tesseract for OCR, and relies on its language packs. For Linux users, you can often find packages that provide language packs:


# Debian/Ubuntu users
apt-cache search tesseract-ocr # Display a list of all Tesseract language packs
apt-get install tesseract-ocr-chi-sim  # Example: Install Chinese Simplified language pack


# Arch Linux users
pacman -S tesseract-data-eng tesseract-data-deu # Example: Install the English and German language packs

# OpenBSD users
pkg_info -aQ tesseract  # Display a list of all Tesseract language packs
pkg_add tesseract-cym  # Example: Install the Welsh language pack

# brew macOS users
brew install tesseract-lang

# Fedora users
dnf search tesseract-langpack # Display a list of all Tesseract language packs 
dnf install tesseract-langpack-ita # Example: Install the Italian language pack


You can then pass the -l LANG argument to OCRmyPDF to give a hint as to what languages it should search for. Multiple languages can be requested.

OCRmyPDF supports Tesseract 4.1.1+. It will automatically use whichever version it finds first on the PATH environment variable. On Windows, if PATH does not provide a Tesseract binary, we use the highest version number that is installed according to the Windows Registry.

Documentation and support

Once OCRmyPDF is installed, the built-in help which explains the command syntax and options can be accessed via:

ocrmypdf --help

Our documentation is served on Read the Docs.

Please report issues on our GitHub issues page, and follow the issue template for quick response.

Feature demo

# Add an OCR layer and require PDF/A
ocrmypdf --output-type pdfa input.pdf output.pdf

# Convert an image to single page PDF
ocrmypdf input.jpg output.pdf

# Add OCR to a file in place (only modifies file on success)
ocrmypdf myfile.pdf myfile.pdf

# OCR with non-English languages (look up your language's ISO 639-3 code)
ocrmypdf -l fra LeParisien.pdf LeParisien.pdf

# OCR multilingual documents
ocrmypdf -l eng+fra Bilingual-English-French.pdf Bilingual-English-French.pdf

# Deskew (straighten crooked pages)
ocrmypdf --deskew input.pdf output.pdf

For more features, see the documentation.

Requirements

In addition to the required Python version, OCRmyPDF requires external program installations of Ghostscript and Tesseract OCR. OCRmyPDF is pure Python, and runs on pretty much everything: Linux, macOS, Windows and FreeBSD.

Plugins

OCRmyPDF provides a plugin interface allowing its capabilities to be extended or replaced. Here are some plugins we are aware of:

  • OCRmyPDF-AppleOCR: replaces the standard Tesseract OCR engine with Apple Vision Framework. Requires macOS.
  • OCRmyPDF-EasyOCR: replaces the standard Tesseract OCR engine with EasyOCR, a newer OCR engine based on PyTorch. GPU strongly recommended.
  • OCRmyPDF-PaddleOCR: replaces the standard Tesseract OCR engine with PaddleOCR, a powerful GPU accelerated OCR engine.

paperless-ngx provides integration of OCRmyPDF into a searchable document management system.

Press & Media

Business enquiries

OCRmyPDF would not be the software that it is today without companies and users choosing to provide support for feature development and consulting enquiries. We are happy to discuss all enquiries, whether for extending the existing feature set, or integrating OCRmyPDF into a larger system.

License

The OCRmyPDF software is licensed under the Mozilla Public License 2.0 (MPL-2.0). This license permits integration of OCRmyPDF with other code, included commercial and closed source, but asks you to publish source-level modifications you make to OCRmyPDF.

Some components of OCRmyPDF have other licenses, as indicated by standard SPDX license identifiers or the DEP5 copyright and licensing information file. Generally speaking, non-core code is licensed under MIT, and the documentation and test files are licensed under Creative Commons ShareAlike 4.0 (CC-BY-SA 4.0).

Disclaimer

The software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Открыть репозиторий ↗