返回顶部
p

pypdfpypdf工具

Extract text, metadata, and pages from PDF files using pypdf. Use for tasks such as reading PDF content, extracting specific pages, splitting or merging PDFs, reading document metadata, and rotating or transforming pages.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
381
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

pypdf

pypdf

使用 scripts/pypdf_cli.py 进行确定性的 PDF 操作,而非临时编写 pypdf 代码片段。

工作流程

  1. 1. 确认 PDF 文件路径在本地可访问。
  2. 运行所需命令(检查、提取文本、提取页面、合并、拆分、旋转)。
  3. 检查文本输出或生成的 PDF 文件。

命令指南

  • - 检查元数据和页数:
- python scripts/pypdf_cli.py info --input <文件.pdf>
  • - 提取所有文本:
- python scripts/pypdf_cli.py extract-text --input <文件.pdf>
  • - 提取指定页面的文本(从 0 开始索引):
- python scripts/pypdf_cli.py extract-text --input <文件.pdf> --pages 0 1 2
  • - 将 PDF 拆分为单页文件:
- python scripts/pypdf_cli.py split --input <文件.pdf> --output-dir <目录/>
  • - 提取页面范围并生成新 PDF:
- python scripts/pypdf_cli.py extract-pages --input <文件.pdf> --pages 0 1 2 --output <输出.pdf>
  • - 合并多个 PDF:
- python scripts/pypdf_cli.py merge --inputs --output <合并后.pdf>
  • - 旋转页面:
- python scripts/pypdf_cli.py rotate --input <文件.pdf> --angle 90 --output <旋转后.pdf> - --angle 必须为 90、180 或 270。 - 可选地使用 --pages 0 2 限制特定页面。

操作规则

  • - 所有命令中的页面均从 0 开始索引。
  • 对于 extract-text,输出到标准输出;需要时重定向到文件。
  • 对于写入新 PDF 的命令,需要显式指定 --output。
  • 如缺少依赖,请安装:pip install pypdf。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 pypdf-1776293908 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 pypdf-1776293908 技能

通过命令行安装

skillhub install pypdf-1776293908

下载

⬇ 下载 pypdf v1.0.0(免费)

文件大小: 3.33 KB | 发布时间: 2026-4-16 18:24

v1.0.0 最新 2026-4-16 18:24
- Initial release of the pypdf skill.
- Provides CLI for extracting text, metadata, and specific pages from PDF files.
- Supports splitting, merging, and rotating PDFs via deterministic commands.
- All operations use scripts/pypdf_cli.py, with clear command structure and instructions.
- Explicit requirements and operational rules included for consistent usage.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部