AI Agent Hub
Back to skills
PDF and Image Text Extractor icon

PDF and Image Text Extractor

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_5f9c21aa/pdf-image-text-extractor according to https://skillhub.cn/install/skillhub.md.

About this skill

What Problem It Solves

Extracting text from images or PDF documents is a common need in digital office workflows, but traditional methods often face issues like inaccurate recognition or lost formatting. Specific challenges include:

  • Converting scanned documents: Accurately turning image-based text into editable formats.
  • Recognizing complex content: Such as digits and mixed text in invoices or business cards, where confusion can occur.
  • Preserving format: Maintaining original layout and heading levels for easy editing or analysis.

How the Skill Works

This skill addresses these problems through an automated process, with core capabilities and key steps:

Core Capabilities:
- Image Text Extraction: Uses the read_image tool for global recognition, covering titles, body text, annotations, and more. For digits, it performs a double-check: After initial global recognition, it executes a second round of localized zoom verification silently, focusing on easily confused digits (e.g., 6/8/9/0) to ensure accuracy.
- PDF Text Extraction: Extracts text via the scripts/pdf_text_extractor.py script, preserving paragraph structure and heading levels, with output in Markdown format.
- Multilingual Support: Recognizes text in Chinese, English, and other languages.

Key Steps:
1. Receive file: Obtain the uploaded image URL or PDF path.
2. Execute extraction: Based on file type, invoke the appropriate tool or script.
3. Format output: Generate structured content, optionally creating a .md file or displaying directly.

Limitations and Considerations

The skill has boundaries; note the following when using it:
- File format support: Handles images (PNG, JPG, etc.) and PDFs (both text-based and scanned), but scanned pages may not extract fully.
- Recognition accuracy: Affected by image clarity and font; the "shape-first" principle applies for digit identification, with uncertain characters marked using [?].
- Complex layout handling: Extraction may be less effective for tables, multi-column layouts, etc.
- Privacy and performance: Files are processed only in the current session and not stored; recommended file size is under 50MB to avoid performance issues.

Use Cases

  • When needing to extract text from multi-page scanned PDF contracts for full-text search and clause modification, use this skill to automatically generate a structured Markdown document.
  • When processing image materials from marketing campaigns, recognize and extract promotional text from posters or ads to create a text database or prepare for translation.
  • Upon receiving invoice images via email from clients, extract key numerical information like invoice numbers and amounts for quick entry into financial systems.
  • During archiving of paper documents, convert scanned PDF files into editable text, preserving original paragraph structure and heading levels for easy retrieval.

Best For

  • Legal document manager: Handles numerous scanned contracts and needs to extract text for digital storage and retrieval.
  • Marketing specialist: Extracts text content from promotional images for content management and cross-platform publishing.
  • Financial assistant: Processes scanned financial documents to extract numerical data for expediting reimbursement and audit processes.
  • Content curator: Extracts text from historical document images for research or publication purposes.