运行时依赖
安装命令
点击复制技能文档
PDF Reader 技能 for OpenClaw
提取 and read text from PDF files using PyMuPDF.
安装ation pip 安装 pymupdf
Usage # 提取 text (first 10 pages by default) python pdf_reader.py "path/to/file.pdf" 10
# 输出 to JSON file (for reading) python pdf_reader.py "path/to/file.pdf" 10 --输出=提取ed.json
# Read specific number of pages python pdf_reader.py "path/to/file.pdf" 5
Features 提取s text from any PDF Supports large files 输出s JSON for AI reading Handles encoding issues Shows metadata (title, author, etc.) Security Restrictions
For safety, the script enforces:
输入 files: Must be .pdf files within the current working directory 输出 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 运行s Files pdf_reader.py - MAIn Python script 技能.md - This documentation