AI Agent Hub
Back to skills
Local PDF OCR to Markdown Converter icon

Local PDF OCR to Markdown Converter

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_543d2acf/pdf-ocr-zc according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

Scanned PDFs often contain only image layers, making them hard to copy, search, retrieve, or feed into vectorization pipelines. Manual OCR for every file becomes repetitive work, especially when processing many documents in a local environment. This skill targets local batch OCR for scanned PDFs: first create searchable PDFs, then prepare the output for later Markdown extraction.

How It Works

The skill runs locally using ocrmypdf and an already installed Tesseract, without relying on external services. The input can be a single PDF or a directory of files. After processing, it produces PDFs with a text layer, which can be copied, searched, or converted further. In batch mode, it can iterate over *.pdf files in a directory and generate the corresponding text-layered outputs. For Simplified Chinese content, the language can be set explicitly with --lang chi_sim, reducing the risk of automatic detection errors. Errors are written to logs/pdf_ocr_error.log, which helps identify bad files, missing dependencies, or parameter issues. The materials also mention using pdf2txt.py for additional text extraction, but the core capability remains OCR text-layer generation.

Boundaries

It is suitable for scanned documents, local processing, offline or intranet environments, and workflows that need searchable PDFs before ingestion. Recognition quality still depends on image resolution, scan quality, handwriting, and model behavior. The skill does not replace full PDF structure parsing, layout reconstruction, table extraction, or multi-document merging. If finer-grained Markdown is required, a downstream conversion step is still needed. Users should ensure that Tesseract and ocrmypdf are available locally and that the output path is writable.

Use Cases

  • Prepare scanned contract PDFs in bulk for later retrieval and vectorization
  • Process a full directory of legacy reports without manually opening an OCR tool for each file
  • Integrate a local PDF preprocessing step into an agent workflow for later text extraction
  • Set a Simplified Chinese OCR language model for scanned Chinese documents to reduce detection errors

Best For

  • Engineers maintaining local document pipelines who need searchable PDFs from scans
  • Developers building agent workflows who need OCR as a reliable preprocessing step
  • Team leads handling scanned reports who need batch-searchable versions
  • Technical users who prefer local or offline processing over external PDF services