据 AlphaMoat 统计,截至 2026-09,pdf-ocr-extraction 累计下载 1,853 次、获 2 个星标,在全部 5,078 个 AI 技能中排名第 4,534 位,在「办公效率」分类(435 个)中排名第 357 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 45 | 1,636 | 2 | - |
| SkillHub ↗ | 224 | 1,853 | 2 | — |
各平台的计数口径不同,统计时间不一致。
适用于缺少原生文本层的扫描版或图片型 PDF:完全免费、不调用第三方 API、无使用限制;原理是把 PDF 页面渲染为高分辨率图片(scale=2)再执行 OCR。依赖:系统二进制 tesseract(含 chi_sim/eng 等语言包)与 Python 包 pypdfium2、pytesseract、Pillow;不要在运行时自动 pip install,依赖应由用户或环境按 metadata 块预装。用法:在临时目录创建 extract.py(用 PdfDocument 遍历页 → bitmap.to_pil() 保存 /tmp/page_i.png → pytesseract.image_to_string(lang='chi_sim+eng') → os.remove 清理 → 拼接全文),再执行 python3 extract.py /path/to/document.pdf。安全约束:临时图片只写 /tmp/ 且提取后立即清理;不要用 shell 动态下载或安装语言包,缺特定语言时通知用户。临时 OCR 图片写入可预测的共享路径可能泄露文档内容,应改用内存 OCR 或私有随机临时目录并在处理后立即删除;缺语言包或语言选项不匹配时 OCR 质量与覆盖率会变差,使用前应装好所需语言包并让 Tesseract 语言选项与文档一致;运行时安装依赖会带来运维与安全不确定性,应在最小权限环境预装 Tesseract、语言包、pypdfium2、pytesseract 与 Pillow。
资料发布于 2026-10-29
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 1,853 | — | 2 |
| 2026-08 | 1,554 | +7.5% | 2 |
| 2026-07 | 1,445 | +20.9% | 2 |
| 2026-06 | 1,195 | +18.0% | 2 |
| 2026-05 | 1,013 | — | 2 |
| 2026-03 | 408 | — | 1 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
---
name: pdf-ocr-extractor
description: Extract text from image-based or scanned PDFs using Tesseract OCR.
metadata:
{
"openclaw":
{
"emoji": "📄",
"requires": { "bins": ["tesseract", "python3"] },
"install": [
{
"id": "tesseract-ocr",
"kind": "system",
"package": "tesseract",
"bins": ["tesseract"],
"label": "Install Tesseract OCR (requires language packs e.g., tesseract-ocr-chi-sim)"
},
{
"id": "pip-deps",
"kind": "uv",
"package": "pypdfium2 pytesseract Pillow",
"label": "Install Python dependencies (pypdfium2, pytesseract, Pillow)"
}
]
}
}
---
# PDF OCR Extractor
Use this skill to extract text from scanned PDFs or image-based PDFs that lack a native text layer. It's completely free, doesn't utilize third-party APIs, and offers unlimited usage. It renders PDF pages to images and runs optical character recognition (OCR).
## Dependencies
This skill requires:
1. **System Binary**: `tesseract` (along with required language data packs like `chi_sim` or `eng`).
2. **Python Packages**: `pypdfium2`, `pytesseract`, and `Pillow`.
*Note: Do not run automated `pip install` commands at runtime. Rely on the user or the environment to pre-install the dependencies defined in the metadata block.*
## Quick Start
Create a Python script (e.g., `extract.py`) in a temporary directory to handle the extraction safely:
```python
import pypdfium2 as pdfium
import pytesseract
from PIL import Image
import sys
import os
def extract(pdf_path):
doc = pdfium.PdfDocument(pdf_path)
full_text = []
for i, page in enumerate(doc):
# Render page to a high-resolution image
bitmap = page.render(scale=2)
tmp_img = f"/tmp/page_{i}.png"
bitmap.to_pil().save(tmp_img)
# Run OCR (assuming English and Simplified Chinese packs are installed)
text = pytesseract.image_to_string(Image.open(tmp_img), lang='chi_sim+eng')
full_text.append(text)
# Cleanup temporary file
os.remove(tmp_img)
return "\n".join(full_text)
if __name__ == "__main__":
if len(sys.argv) > 1:
print(extract(sys.argv[1]))
```
Then execute the script:
```bash
python3 extract.py /path/to/document.pdf
```
## Security & Sandbox Constraints
- Write temporary images only to `/tmp/` and clean them up immediately after extraction.
- Do not attempt to dynamically download or install language packs via shell commands; notify the user if a specific language is missing.通过 MCP 在腾讯文档里新建、编辑与管理在线文档的完整操作手册。
在保留公式、格式与工作簿结构的前提下创建、检查并修改 Excel 文件的技能。
处理 Word 与 DOCX 文档的作业规范,重点是改完之后样式、编号与版式不跑偏。
通过命令行访问 Gmail、日历、Drive、通讯录、Sheets 与 Docs。
PDF和图片文字提取 将文档文字、表格与扫描页识别整理为文本结果。
按主题与风格自动生成 PPT 文件的技能。
通过 kdocs-cli 操作金山文档云文档的官方技能。
用自然语言指令改 PDF 指定页的小工具。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。