跳至主要内容
小龙虾小龙虾AI
🤖

Pdfreader

Extract text and metadata from PDF files using PyMuPDF, supporting large files and outputting results in JSON format.

下载1.1k
星标2
版本1.0.3
图像视频
安全通过

技能说明

PDF Reader Skill for OpenClaw

Extract and read text from PDF files using PyMuPDF.

Installation

pip install pymupdf

Usage

# Extract text (first 10 pages by default)
python pdf_reader.py "path/to/file.pdf" 10

# Output to JSON file (for reading)
python pdf_reader.py "path/to/file.pdf" 10 --output=extracted.json

# Read specific number of pages
python pdf_reader.py "path/to/file.pdf" 5

Features

  • Extracts text from any PDF
  • Supports large files
  • Outputs JSON for AI reading
  • Handles encoding issues
  • Shows metadata (title, author, etc.)

Security Restrictions

For safety, the script enforces:

  • Input files: Must be .pdf files within the current working directory
  • Output files: Must be .json files within the current working directory
  • No path traversal (../) allowed
  • Files can only be read/written in the directory where the script runs

Files

  • pdf_reader.py - Main Python script
  • SKILL.md - This documentation

如何使用「Pdfreader」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「Pdfreader技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能