Skip to content
paddleocr-vl-1.5 logo

paddleocr-vl-1.5

Advanced document parsing with PaddleOCR-VL 1.5 vision-language model. Returns complete document structure including text, tables, formulas, charts, and layout information. Claude extracts relevant content based on user needs.

NeverSight/skills_feed0installs215stars

SKILL.md

Full skill instructions

PaddleOCR-VL 1.5 Document Parsing Skill

When to Use This Skill

✅ Use PaddleOCR-VL 1.5 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
  • Any document requiring structured understanding

❌ Use PP-OCRv5 instead for:

  • Simple text-only extraction
  • Quick OCR tasks where speed is critical
  • Screenshots or simple images with clear text

How to Use This Skill

⛔ MANDATORY RESTRICTIONS - DO NOT VIOLATE ⛔

  1. ONLY use PaddleOCR-VL 1.5 API - Execute the script python scripts/​paddleocr-vl-1.5/​vl_caller.py
  2. NEVER use Claude's built-in vision - Do NOT parse documents yourself
  3. NEVER offer alternatives - Do NOT suggest "I can try to analyze it" or similar
  4. IF API fails - Display the error message and STOP immediately
  5. NO fallback methods - Do NOT attempt document parsing any other way

If the script execution fails (API not configured, network error, etc.):

  • Show the error message to the user
  • Do NOT offer to help using your vision capabilities
  • Do NOT ask "Would you like me to try parsing it?"
  • Simply stop and wait for user to fix the configuration

Basic Workflow

  1. Execute document parsing:

    python scripts/​paddleocr-vl-1.5/​vl_caller.py --file-url "URL provided by user"
    

    Or for local files:

    python scripts/​paddleocr-vl-1.5/​vl_caller.py --file-path "file path"
    

    Save result to file (recommended):

    python scripts/​paddleocr-vl-1.5/​vl_caller.py --file-url "URL" --output result.json --pretty
    
    • The script will display: Result saved to: /​absolute/​path/​to/​result.json
    • This message appears on stderr, the JSON is saved to the file
    • Tell the user the file path shown in the message
  2. The script returns COMPLETE JSON with all document content:

    • Headers, footers, page numbers
    • Main text content
    • Tables with structure
    • Formulas (with LaTeX)
    • Figures and charts
    • Footnotes and references
    • Layout and reading order
  3. Extract what the user needs from the complete data based on their request.

IMPORTANT: Complete Content Display

CRITICAL: You must display the COMPLETE extracted content to the user based on their needs.

  • The script returns ALL document content in a structured format
  • Display the full content requested by the user, do NOT truncate or summarize
  • If user asks for "all text", show the entire result.full_text
  • If user asks for "tables", show ALL tables in the document
  • If user asks for "main content", filter out headers/​footers but show ALL body text

What this means:

  • ✅ DO: Display complete text, all tables, all formulas as requested
  • ✅ DO: Present content in reading order using reading_order array
  • ❌ DON'T: Truncate with "..." unless content is excessively long (>10,000 chars)
  • ❌ DON'T: Summarize or provide excerpts when user asks for full content
  • ❌ DON'T: Say "Here's a preview" when user expects complete output

Example - Correct:

User: "Extract all the text from this document"
Claude: I've parsed the complete document. Here's all the extracted text:

[Display entire result.full_text or concatenated regions in reading order]

Document Statistics:
- Total regions: 25
- Text blocks: 15
- Tables: 3
- Formulas: 2
Quality: Excellent (confidence: 0.92)

Example - Incorrect ❌:

User: "Extract all the text"
Claude: "I found a document with multiple sections. Here's the beginning:
'Introduction...' (content truncated for brevity)"

Understanding the JSON Response

The script returns a complete JSON structure:

{
  "ok": true,
  "result": {
    "full_text": "Complete text with all content including headers, footers, etc.",
    "layout": {
      "regions": [
        {
          "id": 0,
          "type": "header",
          "content": "Chapter 3: Methods",
          "bbox": [100, 50, 500, 100]
        },
        {
          "id": 1,
          "type": "text",
          "content": "Main body text content...",
          "bbox": [100, 150, 500, 300]
        },
        {
          "id": 2,
          "type": "table",
          "content": {
            "rows": 3,
            "cols": 2,
            "cells": [["Header1", "Header2"], ["Data1", "Data2"]]
          },
          "bbox": [100, 350, 500, 550]
        },
        {
          "id": 3,
          "type": "formula",
          "content": "E = mc^2",
          "latex": "$E = mc^2$",
          "bbox": [200, 600, 400, 630]
        },
        {
          "id": 4,
          "type": "footnote",
          "content": "[1] Reference citation",
          "bbox": [100, 650, 500, 680]
        },
        {
          "id": 5,
          "type": "footer",
          "content": "University Name 2024",
          "bbox": [100, 750, 500, 800]
        },
        {
          "id": 6,
          "type": "page_number",
          "content": "25",
          "bbox": [250, 770, 280, 790]
        }
      ],
      "reading_order": [0, 1, 2, 3, 4, 5, 6]
    }
  },
  "metadata": {
    "processing_time_ms": 3500,
    "total_pages": 1,
    "model_version": "paddleocr-vl-1.5"
  }
}

Region Types

The type field indicates the element category:

TypeDescriptionTypically Include?
headerPage headers (chapter/​section titles)Exclude (usually repetitive)
textMain body textInclude
tableTables with structured dataInclude
formulaMathematical formulasInclude
figureImages, charts, diagramsInclude
footnoteFootnotes and referencesInclude (often important)
footerPage footers (author/​institution)Exclude (usually repetitive)
page_numberPage numbersExclude (not content)
margin_noteMargin annotationsContext-dependent

Content Extraction Guidelines

Based on user intent, filter the regions:

User SaysWhat to ExtractHow
"Extract main content"text, table, formula, figure, footnoteSkip header, footer, page_number
"Get all tables"table onlyFilter by type="table"
"Extract formulas"formula onlyFilter by type="formula"
"Complete document"EverythingUse all regions or full_text
"Without headers/​footers"Core contentSkip header, footer types
"Include page numbers"Core + page_numberKeep page_number type

Usage Examples

Example 1: Extract Main Content (default behavior)

python scripts/​paddleocr-vl-1.5/​vl_caller.py \
  --file-url "https://example.com/​paper.pdf" \
  --pretty

Then filter JSON to extract core content:

  • Include: text, table, formula, figure, footnote
  • Exclude: header, footer, page_number

Example 2: Extract Tables Only

python scripts/​paddleocr-vl-1.5/​vl_caller.py \
  --file-path "./​financial_report.pdf" \
  --pretty

Then filter JSON:

  • Only keep regions where type="table"
  • Present table content in markdown format

Example 3: Complete Document with Everything

python scripts/​paddleocr-vl-1.5/​vl_caller.py \
  --file-url "URL" \
  --pretty

Then use result.full_text or present all regions in reading_order.

First-Time Configuration

When API is not configured:

The error will show:

Configuration error: API not configured. Get your API at: https://aistudio.baidu.com/​paddleocr/​task

Auto-configuration workflow:

  1. Show the exact error message to user (including the URL)

  2. Tell user to provide credentials:

    Please visit the URL above to get your VL_API_URL and VL_TOKEN.
    Once you have them, send them to me and I'll configure it automatically.
    
  3. When user provides credentials (accept any format):

    • VL_API_URL=https://xxx.com/​v1, VL_TOKEN=abc123...
    • Here's my API: https://xxx and token: abc123
    • Copy-pasted code format
    • Any other reasonable format
  4. Parse credentials from user's message:

    • Extract VL_API_URL value (look for URLs)
    • Extract VL_TOKEN value (long alphanumeric string, usually 40+ chars)
  5. Configure automatically:

    python scripts/​paddleocr-vl-1.5/​configure.py --api-url "PARSED_URL" --token "PARSED_TOKEN"
    
  6. If configuration succeeds:

    • Inform user: "Configuration complete! Parsing document now..."
    • Retry the original parsing task
  7. If configuration fails:

    • Show the error
    • Ask user to verify the credentials

IMPORTANT: The error message format is STRICT and must be shown exactly as provided by the script. Do not modify or paraphrase it.

Handling Large Files (>20MB)

Problem: Local files larger than 20MB are rejected by default.

Solutions (Choose based on your situation):

Solution 1: Use URL Upload (Recommended) ⭐

Upload your file to a web server and use --file-url:

# Instead of local file
python scripts/​paddleocr-vl-1.5/​vl_caller.py --file-path "large_file.pdf"  # ❌ May fail

# Use URL instead
python scripts/​paddleocr-vl-1.5/​vl_caller.py --file-url "https://your-server.com/​large_file.pdf"  # ✅ No size limit

Benefits:

  • No local file size limit
  • Faster upload (direct from API server)
  • Suitable for very large files (>100MB)
Solution 2: Increase Size Limit

Adjust the limit in .env file:

# .env
VL_MAX_FILE_SIZE_MB=50  # Increase from 20MB to 50MB

Then process as usual:

python scripts/​paddleocr-vl-1.5/​vl_caller.py --file-path "large_file.pdf"

Note: Your API provider may still have upload limits. Check with your VL API service.

Solution 3: Compress/​Optimize File

Use the built-in optimizer to reduce file size:

# Install optimization dependencies first
pip install -r scripts/​paddleocr-vl-1.5/​requirements-optimize.txt

# Optimize image (reduce quality)
python scripts/​paddleocr-vl-1.5/​optimize_file.py input.png output.png --quality 70

# Optimize PDF (compress images within)
python scripts/​paddleocr-vl-1.5/​optimize_file.py input.pdf output.pdf --target-size 15

# Then process optimized file
python scripts/​paddleocr-vl-1.5/​vl_caller.py --file-path "output.pdf" --pretty

The optimizer will:

  • Compress images (adjust JPEG quality)
  • Resize images if needed (maintain aspect ratio)
  • Compress PDF images (reduce DPI to 150)
  • Show before/​after size comparison
Solution 4: Process Specific Pages (PDF Only)

If you only need certain pages from a large PDF, extract them first:

# Using PyMuPDF (requires: pip install PyMuPDF)
python -c "
import fitz
doc = fitz.open('large.pdf')
writer = fitz.open()
writer.insert_pdf(doc, from_page=0, to_page=4)  # Pages 1-5
writer.save('pages_1_5.pdf')
"

# Then process the smaller file
python scripts/​paddleocr-vl-1.5/​vl_caller.py --file-path "pages_1_5.pdf"
Solution 5: Upload to Cloud Storage

For extremely large files (>100MB), use cloud storage with public URLs:

# Example: Upload to AWS S3, Google Drive, or similar
# Get public URL: https://storage.example.com/​my-document.pdf

# Process via URL
python scripts/​paddleocr-vl-1.5/​vl_caller.py --file-url "https://storage.example.com/​my-document.pdf"

Comparison Table:

SolutionMax SizeSpeedComplexityBest For
URL UploadUnlimitedFastLowAny large file
Increase LimitConfigurableMediumVery LowSlightly over limit
Compress~70% reductionSlowMediumImages/​PDFs with images
Extract PagesAs neededFastMediumMulti-page PDFs
Cloud StorageUnlimitedFastHighVery large files (>100MB)

Error Handling

Authentication failed (401/​403):

error: Authentication failed

→ Token is invalid, reconfigure with correct credentials

API quota exceeded (429):

error: API quota exceeded

→ Daily API quota exhausted, inform user to wait or upgrade

Unsupported format:

error: Unsupported file format

→ File format not supported, convert to PDF/​PNG/​JPG

Pseudo-Code: Content Extraction

Extract main content (most common):

def extract_main_content(json_response):
    regions = json_response['result']['layout']['regions']

    # Keep only core content types
    core_types = ['text', 'table', 'formula', 'figure', 'footnote']
    main_regions = [r for r in regions if r['type'] in core_types]

    # Sort by reading order
    reading_order = json_response['result']['layout']['reading_order']
    sorted_regions = sort_by_order(main_regions, reading_order)

    # Present to user
    for region in sorted_regions:
        if region['type'] == 'text':
            print(region['content'])
        elif region['type'] == 'table':
            print_as_markdown_table(region['content'])
        elif region['type'] == 'formula':
            print(f"Formula: {region['latex']}")

Extract tables only:

def extract_tables(json_response):
    regions = json_response['result']['layout']['regions']
    tables = [r for r in regions if r['type'] == 'table']

    for i, table in enumerate(tables):
        print(f"Table {i+1}:")
        print_as_markdown_table(table['content'])

Extract everything:

def extract_complete(json_response):
    # Simply use the full_text which includes everything
    print(json_response['result']['full_text'])

    # Or present all regions in order
    regions = json_response['result']['layout']['regions']
    reading_order = json_response['result']['layout']['reading_order']

    for idx in reading_order:
        region = regions[idx]
        print(f"[{region['type']}] {region['content']}")

Important Notes

  • The script NEVER filters content - It always returns complete data
  • Claude decides what to present - Based on user's specific request
  • All data is always available - Can be re-interpreted for different needs
  • No information is lost - Complete document structure preserved

Reference Documentation

For in-depth understanding of the PaddleOCR-VL 1.5 system, refer to:

  • references/​paddleocr-vl-1.5/​vl_model_spec.md - VL model specifications
  • references/​paddleocr-vl-1.5/​layout_schema.md - Layout detection schema
  • references/​paddleocr-vl-1.5/​output_format.md - Complete output format specification

Load these reference documents into context when:

  • Debugging complex parsing issues
  • Understanding layout detection algorithm
  • Working with special document types
  • Customizing content extraction logic

Testing the Skill

To verify the skill is working properly:

python scripts/​paddleocr-vl-1.5/​smoke_test.py

This tests configuration and optionally API connectivity.

More skills from NeverSight

devops-deployer logo
NeverSight/skills_feed

devops-deployer

Comprehensive DevOps and deployment workflow that orchestrates infrastructure automation, CI/CD pipelines, container orchestration, and cloud deployment. Handles everything from infrastructure as code and pipeline setup to monitoring, scaling, and disaster recovery.

215 1
View
avnu logo
NeverSight/skills_feed

avnu

Integrate avnu SDK for Starknet DeFi: token swaps with best-price routing, DCA recurring buys, native staking, gasless transactions via paymaster, and market data. Use when building Starknet trading, DEX aggregation, or DeFi automation features.

215 0
View
post-to-x logo
NeverSight/skills_feed

post-to-x

发布内容和文章到 X (Twitter)。支持带图片的普通推文和 X Articles(长文)。使用真实的 Chrome 和 CDP 来绕过自动化检测。

215 0
View
ralph-prompt-builder logo
NeverSight/skills_feed

ralph-prompt-builder

Master orchestrator for generating Ralph Wiggum-compatible prompts. Analyzes task requirements and routes to appropriate generator (single-task, multi-task, project, or research). Use when you need to create any Ralph loop prompt and want automatic selection of the right generator.

215 0
View
branch-comparison logo
NeverSight/skills_feed

branch-comparison

Use when the user asks to compare branches, analyze git diffs, review changes between branches, update specifications based on code changes, or analyze what changed. Triggers on keywords like "compare branches", "git diff", "what changed", "branch comparison", "code changes", "spec update".

215 0
View
fastapi-development logo
NeverSight/skills_feed

fastapi-development

Build high-performance FastAPI applications with async routes, validation, dependency injection, security, and automatic API documentation. Use when developing modern Python APIs with async support, automatic OpenAPI documentation, and high performance requirements.

215 0
View
zendesk-chat logo
NeverSight/skills_feed

zendesk-chat

Enables Claude to manage Zendesk Chat conversations, support tickets, and customer service operations

215 0
View
forge logo
NeverSight/skills_feed

forge

Mine transcripts for knowledge - decisions, learnings, failures, patterns. Triggers: "forge insights", "mine transcripts", "extract knowledge".

215 0
View
mixpanel logo
NeverSight/skills_feed

mixpanel

Track product analytics and user behavior with Mixpanel's event-based platform.

215 0
View
ocpp logo
NeverSight/skills_feed

ocpp

OCPP protocol reference for EV charging infrastructure development. Covers OCPP 2.0.1 and OCPP 1.6J. Use when working with OCPP messages, charging station code, CSMS/Central System backends, smart charging, transaction handling, or EV charging protocols. Activates on keywords: OCPP, charging stat...

215 0
View
bee-collect logo
NeverSight/skills_feed

bee-collect

Gather scattered ideas into organized GitHub issues. The bee collects pollen from every flower, checks if the hive already has it, and carefully deposits new work in the comb for later. Never edits code—only organizes the work ahead. Use when creating issues from TODOs or planning work.

215 0
View
vercel-react-native-skills logo
NeverSight/skills_feed

vercel-react-native-skills

Comprehensive best practices for React Native and Expo applications. Contains rules across multiple categories covering performance, animations, UI patterns, and platform-specific optimizations.

215 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View