paddleocr-doc-parsinglisted
Install: claude install-skill dxkjuanjuan/ui-forge
# PaddleOCR Document Parsing
## When to Use This Skill
**Use this skill for**:
- Documents with tables (invoices, financial reports, spreadsheets)
- Documents with mathematical formulas (academic papers, scientific documents)
- Documents with charts and diagrams
- Multi-column layouts (newspapers, magazines, brochures)
- Complex document structures requiring layout analysis
- Converting PDFs to structured Markdown with images
## Usage
### Method 1: Python API (Recommended)
```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"
file_path = "<local file path or file url>"
headers = {"Authorization": f"bearer {TOKEN}"}
optional_payload = {
"useDocOrientationClassify": True,
"useDocUnwarping": True,
"useChartRecognition": True,
}
# 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})
assert job_response.status_code == 200
jobId = job_response.json()["data"]["jobId"]
# Poll for results:
while True:
result = requests.get(f"{JOB_URL}/{jobId}", headers=