skills/ocrmypdf-skills/ocrmypdf/SKILL.md
OCRmyPDF core skill — add searchable OCR text layer to scanned PDFs, convert images to searchable PDFs, support 100+ languages via Tesseract. Use when the user needs to OCR a PDF, make a scanned PDF searchable, or extract text from scanned documents.
npx skillsauth add partme-ai/full-stack-skills ocrmypdfInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted. It uses Tesseract OCR, supports 100+ languages, produces PDF/A by default, and distributes work across all CPU cores.
For image processing (deskew, rotate, clean), see the ocrmypdf-image skill. For optimization and PDF/A options, see ocrmypdf-optimize. For batch/Docker/scripting, see ocrmypdf-batch. For Python API and plugins, see ocrmypdf-api.
| OS | Command |
|----|---------|
| Debian / Ubuntu | apt install ocrmypdf |
| Fedora | dnf install ocrmypdf tesseract-osd |
| macOS (Homebrew) | brew install ocrmypdf |
| macOS (MacPorts) | port install ocrmypdf |
| FreeBSD | pkg install py-ocrmypdf |
| Snap | snap install ocrmypdf |
# After installing system dependencies (Tesseract, Ghostscript)
pip install ocrmypdf
ocrmypdf --version
ocrmypdf --help
# Basic OCR — input scanned PDF, output searchable PDF/A
ocrmypdf input.pdf output.pdf
# OCR an image file directly
ocrmypdf --image-dpi 300 scan.png output.pdf
# OCR in place (only overwrites on success)
ocrmypdf myfile.pdf myfile.pdf
OCRmyPDF uses Tesseract language packs. Install them for your OS:
# Debian / Ubuntu
apt-cache search tesseract-ocr # List all language packs
apt install tesseract-ocr-chi-sim # Chinese Simplified
apt install tesseract-ocr-fra # French
# macOS (Homebrew)
brew install tesseract-lang # All languages
# Fedora
dnf search tesseract-langpack
dnf install tesseract-langpack-ita # Italian
# Single language
ocrmypdf -l fra document.pdf output.pdf
# Multiple languages
ocrmypdf -l eng+fra bilingual.pdf output.pdf
# Chinese Simplified + English
ocrmypdf -l chi_sim+eng chinese-doc.pdf output.pdf
Note: Use ISO 639-3 codes for language identifiers.
# Skip pages that already have text — only OCR pages without text
ocrmypdf input.pdf output.pdf
--force-ocr or -m force)# Rasterize and OCR all pages, even those with existing text
ocrmypdf --force-ocr input.pdf output.pdf
# v17+ short form:
ocrmypdf -m force input.pdf output.pdf
--redo-ocr or -m redo)# Replace existing OCR without rasterizing (preserves quality)
ocrmypdf --redo-ocr input.pdf output.pdf
# v17+ short form:
ocrmypdf -m redo input.pdf output.pdf
--skip-text or -m skip)# Skip pages with any text, only OCR blank/image pages
ocrmypdf --skip-text input.pdf output.pdf
# v17+ short form:
ocrmypdf -m skip input.pdf output.pdf
# Apply image processing / PDF/A conversion without OCR
ocrmypdf --ocr-engine none input.pdf output.pdf
# OCR only specific pages
ocrmypdf --pages 1,3,5-10 input.pdf output.pdf
# OCR only the first page, minimal changes elsewhere
ocrmypdf --pages 1 --output-type pdf --optimize 0 input.pdf output.pdf
# PDF/A (default) — for archival
ocrmypdf --output-type pdfa input.pdf output.pdf
# Standard PDF
ocrmypdf --output-type pdf input.pdf output.pdf
# Auto (v17+) — speculative PDF/A, falls back to standard PDF
ocrmypdf --output-type auto input.pdf output.pdf
# No output PDF — only produce sidecar text
ocrmypdf --output-type none --sidecar text.txt input.pdf -
# Produce a companion text file with OCR text
ocrmypdf --sidecar output.txt input.pdf output.pdf
# Set output PDF metadata
ocrmypdf --title "My Document" --author "Author Name" --subject "Subject" input.pdf output.pdf
# Use 4 CPU cores (default: all available)
ocrmypdf --jobs 4 input.pdf output.pdf
# Single-threaded
ocrmypdf --jobs 1 input.pdf output.pdf
ocrmypdf scanned.pdf searchable.pdf
ocrmypdf --image-dpi 300 scan.jpg output.pdf
ocrmypdf -l eng+deu+fra multilingual.pdf output.pdf
ocrmypdf --redo-ocr old-ocr.pdf updated.pdf
ocrmypdf --ocr-engine none --force-ocr input.pdf stripped.pdf
| Task | Command |
|------|---------|
| Basic OCR | ocrmypdf input.pdf output.pdf |
| Specify language | ocrmypdf -l fra input.pdf output.pdf |
| Multiple languages | ocrmypdf -l eng+fra input.pdf output.pdf |
| Force re-OCR all pages | ocrmypdf --force-ocr input.pdf output.pdf |
| Replace existing OCR | ocrmypdf --redo-ocr input.pdf output.pdf |
| Skip pages with text | ocrmypdf --skip-text input.pdf output.pdf |
| Specific pages only | ocrmypdf --pages 1,3,5-10 input.pdf output.pdf |
| Output standard PDF | ocrmypdf --output-type pdf input.pdf output.pdf |
| Extract text sidecar | ocrmypdf --sidecar text.txt input.pdf output.pdf |
| Image to PDF | ocrmypdf --image-dpi 300 image.png output.pdf |
| In-place OCR | ocrmypdf myfile.pdf myfile.pdf |
| Set metadata | ocrmypdf --title "Title" input.pdf output.pdf |
| Parallel jobs | ocrmypdf --jobs 4 input.pdf output.pdf |
-l), try --deskew (see ocrmypdf-image), or --oversample 300.--force-ocr, --redo-ocr, or --skip-text as appropriate.--optimize levels and JBIG2.--invalidate-digital-signatures to override (signatures will be invalidated).development
Provides per-component and per-API examples with cross-platform compatibility details for uni-app, covering built-in components, uni-ui components, and APIs (network, storage, device, UI, navigation, media). Use when the user needs official uni-app components or APIs, wants per-component examples with doc links, or needs platform compatibility checks.
tools
Creates new uni-app projects via the official CLI or HBuilderX with Vue 2/Vue 3 template selection, manifest.json and pages.json configuration, and directory structure setup. Use when the user wants to scaffold a new uni-app project, initialize project files with a single command, or set up the development environment.
tools
Browses, installs, configures, and manages plugins from the uni-app plugin market (ext.dcloud.net.cn) including component plugins, API plugins, and template plugins with dependency handling. Use when the user needs to find and install uni-app plugins, configure plugin settings, manage plugin dependencies, or integrate third-party components.
tools
Develops native Android and iOS plugins for uni-app including module creation, JavaScript-to-native communication, and plugin packaging for distribution. Use when the user needs to build custom native modules, extend uni-app with native capabilities (camera, Bluetooth, sensors), or create publishable native plugins.