paddleocr-text-recognition
PaddlePaddle/PaddleOCR · Agent Skill
從圖像、照片、掃描件和螢幕截圖中提取文字,準確度高,包括手寫體和小字體。
前往安裝 ↓安裝選項
預設為含檢閱步驟的提示。您可以切換到直接指令。
複製提示,貼入 Claude、Codex 或其他助手,它會檢視技能頁面並安裝。
I'd like to install this Claude Code skill: https://github.com/PaddlePaddle/PaddleOCR/tree/main/skills/paddleocr-text-recognition Please review the SKILL.md file, verify the skill is legitimate, then copy the skill folder into .claude/skills/ of my project.
直接指令會跳過檢閱 — 請先檢查原始碼。
npx skills add https://github.com/PaddlePaddle/PaddleOCR/tree/main/skills/paddleocr-text-recognition
安裝前請先檢視 SKILL.md 與相關檔案。點擊檔案即可預覽。
SKILL.md 內容
作者原文 · 唯讀PaddleOCR Text Recognition
When to Use This Skill
Use this skill for:
- Extract text from images (screenshots, photos, scans)
- Extract text from PDFs or document images when the goal is line/box-level text
- Extract text from URLs or local files that point to images/PDFs
Do not use for:
- Documents with tables, formulas, charts, or complex layouts — use Document Parsing instead
Usage
Basic OCR
From URL:
paddleocr api \
--model_type ocr \
--file_url "https://example.com/image.png"
From local file:
paddleocr api \
--model_type ocr \
--file_path "./document.pdf"
Common Options
# With specific model
paddleocr api \
--model_type ocr \
--model PP-OCRv5 \
--file_path "./report.pdf"
# Disable preprocessing (faster, for flat/well-oriented images)
paddleocr api \
--model_type ocr \
--file_path "./document.pdf" \
--use_doc_unwarping False \
--use_doc_orientation_classify False
# Save result to file
paddleocr api \
--model_type ocr \
--file_url "https://..." \
--output result.json
# Page ranges
paddleocr api \
--model_type ocr \
--file_path "./large.pdf" \
--page_ranges "1-5,10,15-20"
Output Format
{
"jobId": "job-xxx",
"pages": [
{
"prunedResult": {
"rec_texts": ["Line 1", "Line 2"],
"rec_scores": [0.98, 0.95]
},
"ocrImageUrl": "https://..."
}
]
}
Important Notes
Preprocessing options: By default, the API enables document preprocessing (unwarping and orientation classification). For flat, well-oriented images (screenshots, properly scanned documents), you can disable preprocessing for faster results:
paddleocr api --model_type ocr --file_path "./document.pdf" --use_doc_unwarping False --use_doc_orientation_classify False
Keep preprocessing enabled when:
- The input is a photo of a curved or folded document
- The document has significant perspective distortion
- Orientation is uncertain (rotated 90/180/270 degrees)
Display complete results: Always show the full extracted content to users. Do not truncate with "..." unless content exceeds 10,000 characters. When multiple pages are processed, summarize if needed but provide complete results when explicitly requested.
Handle errors gracefully: When the CLI returns an error, inform the user of the specific issue rather than silently failing or falling back to your own vision capabilities. Common errors:
- Authentication:
PADDLEOCR_ACCESS_TOKENinvalid or missing - Quota: API rate limit exceeded
- No content detected: Image may be blank or contain no text
CLI Reference
Run paddleocr api --help for all options.
For full documentation, see: PaddleOCR Official Documentation