paddleocr-text-recognitionlisted
Install: claude install-skill dxkjuanjuan/ui-forge
# 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
### Method 1: Python API (Recommended)
Run a Python script to call the PaddleOCR API directly:
```python
import json, os, requests, sys, time
JOB_URL = "https://paddleocr.aistudio-app.com/api/v2/ocr/jobs"
TOKEN = os.environ.get("PADDLEOCR_ACCESS_TOKEN")
MODEL = "PaddleOCR-VL-1.6"
headers = {"Authorization": f"bearer {TOKEN}"}
optional_payload = {
"useDocOrientationClassify": False,
"useDocUnwarping": False,
"useChartRecognition": False,
}
# For URL input:
headers["Content-Type"] = "application/json"
payload = {"fileUrl": file_url, "model": MODEL, "optionalPayload": optional_payload}
job_response = requests.post(JOB_URL, json=payload, headers=headers)
# For local file input:
data = {"model": MODEL, "optionalPayload": json.dumps(optional_payload)}
with open(file_path, "rb") as f:
job_response = requests.post(JOB_URL, headers=headers, data=data, files={"file": f})
jobId = job_response.json()["data"]["jobId"]
# Poll for results:
while True:
result = requests.get(f"{JOB_URL}/{jobId}", headers=headers).json()["data"]
if result["state"] == "do