ppocrv5

Extract text from images and PDFs via the PP-OCRv5 API with quality scoring.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/chhpt/skills --skill ppocrv5-chhpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ppocrv5
Source: https://github.com/chhpt/skills/tree/main/skills/ppocrv5
Command: npx skills add https://github.com/chhpt/skills --skill ppocrv5-chhpt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Extracting text from images, scanned documents, and PDFs manually is slow and error-prone. This Skill performs OCR on visual content through the Paddle AI Studio PP-OCRv5 API and returns structured JSON with recognized text, confidence scores, and quality metrics. ## Core Features & Use Cases - Image and PDF OCR: Recognize text from screenshots, photos, scans, invoices, receipts, forms, and tables via URL or local file path. - Adaptive Quality Modes: Choose auto, fast, or quality modes; auto mode retries up to 3 times with progressive correction to reach a target quality score. - Structured JSON Output: Get full text, per-page line items, quality scores, and clear error codes for authentication, quota, and empty-result cases. - Use Case: A user receives a photo of a receipt and needs the text for an expense report. Run the OCR script on the image, read result.full_text, and check quality.quality_score to confirm the extraction is trustworthy. ## Quick Start Ask the assistant to extract the text from your image or PDF by providing its URL or local file path, for example: "Extract the text from this invoice image at ./receipt.jpg."

Frequently Asked Questions about ppocrv5

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract text from an image using OCR?

Run the ocr_caller.py script with --file-url for an image URL or --file-path for a local file. The script returns JSON where result.full_text contains all recognized text and quality.quality_score indicates recognition confidence.

How do I OCR a PDF document from a URL?

Pass the PDF URL to the script with the --file-url flag, for example python scripts/ocr_caller.py --file-url "URL" --pretty. The response includes per-page results under result.pages along with the combined full_text.

What is the difference between fast, quality, and auto OCR modes?

Fast mode prioritizes speed for clear images, quality mode maximizes accuracy, and auto mode adaptively retries 1-3 times with increasing correction levels. Auto is the default and recommended mode unless the user requests otherwise.

Why does OCR return a 403 authentication error?

A 403 error with code PROVIDER_AUTH_ERROR means the access token is invalid. Re-run python scripts/configure.py and enter a valid Paddle AI Studio API_URL and PADDLE_OCR_TOKEN, which are stored in the .env file.

What does a low OCR quality score mean?

A quality_score below 0.5 indicates poor recognition or no detected text, often caused by blurry, blank, or corrupted images. Try --mode quality, verify the image contains text, or provide a higher resolution version.

When should I not use OCR for text extraction?

Do not use OCR for plain text files, code files, or markdown documents that can be read directly. OCR is only needed when the content exists as pixels in images, scans, or image-based PDFs.