PDF 合并与拆分:自动化 PDF 页面管理 - Openclaw Skills
作者:互联网
2026-04-16
什么是 PDF 合并与拆分?
PDF 合并与拆分技能使开发人员和高级用户能够通过简单的自然语言命令处理复杂的 PDF 操作。无论您是需要将多个项目报告整合到一个文件中,还是从冗长的合同中提取特定条款,此技能都提供了在 Openclaw Skills 生态系统中高效执行这些任务的逻辑框架。它支持广泛的操作,包括页面旋转、删除和插入,确保您的文档管理既精确又自动化。
通过利用此技能,用户可以绕过手动拖放界面,转而使用程序化指令来处理批量处理和复杂的文档重组。这款 Openclaw Skills 工具旨在与强大的命令行工具对接,为您的 AI 辅助开发环境带来专业级的 PDF 编辑能力。
下载入口:https://github.com/openclaw/skills/tree/main/skills/lijie420461340/pdf-merge-split
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install pdf-merge-split
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 pdf-merge-split。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
PDF 合并与拆分 应用场景
- 将独立的章节文件合并成完整的电子书或技术手册。
- 将大型月度报告拆分为较小的部分,以便通过电子邮件分发。
- 从法律合同中提取特定的签名页以进行快速归档。
- 重新排序或旋转扫描文档,以确保正确的方向和逻辑顺序。
- 根据特定的项目命名约定,批量合并多个目录中的文档。
- 用户提供描述所需 PDF 操作(如合并文件或提取页面)的自然语言提示。
- 该技能分析目标 PDF 文件以确定其结构、页数和现有元数据。
- 生成执行计划,规划出所需的精确页面范围、插入点或拆分标记。
- 该技能选择合适的后端工具并配置转换参数。
- 执行操作,根据指定的命名模式和质量设置生成新的 PDF 文件。
PDF 合并与拆分 配置指南
要在 Openclaw Skills 环境中使用 PDF 合并与拆分功能,请确保您的系统中安装了必要的 CLI 工具。
# 对于使用 Homebrew 的 macOS 用户
brew install pdftk-java qpdf pdfcpu
# 对于 Ubuntu 或基于 Debian 的 Linux 系统
sudo apt-get update
sudo apt-get install pdftk qpdf
安装工具后,请确保您的 AI 代理具有读写文档目录的适当文件系统权限。
PDF 合并与拆分 数据架构与分类体系
该技能使用结构化计划组织 PDF 操作,该计划跟踪文件元数据和页面级转换。这确保了在发生任何文件修改之前透明。
| 属性 | 描述 | 示例 |
|---|---|---|
| 输入文件 | 源 PDF 路径及其特定页面范围的数组 | [{"file": "cover.pdf", "pages": "1"}] |
| 操作 | 要应用的特定转换类型 | merge, split, rotate, delete |
| 输出配置 | 生成的文件名、路径和压缩设置 | combined_report_v1.pdf |
| 页面映射 | 重新排序或插入页面的逻辑 | [1, 2, 4, 3, 5] |
| 质量 | 输出文件的分辨率和压缩级别 | 72 DPI / 中等压缩 |
name: PDF Merge & Split
description: Combine multiple PDFs or split into separate files
author: claude-office-skills
version: "1.0"
tags: [pdf, merge, split, combine, extract, pages]
models: [claude-sonnet-4, claude-opus-4]
tools: [computer, file_operations]
PDF Merge & Split
Combine multiple PDF files into one or split PDFs into separate documents.
Overview
This skill helps you:
- Merge multiple PDFs into a single file
- Split PDFs by page ranges
- Extract specific pages
- Reorder pages within a PDF
- Create custom arrangements
How to Use
Merge PDFs
"Merge these 3 PDFs into one file"
"Combine document1.pdf and document2.pdf"
"Join all PDFs in this folder in alphabetical order"
Split PDF
"Split this PDF into individual pages"
"Extract pages 5-10 from this PDF"
"Split this PDF every 5 pages"
Reorder
"Move page 3 to the end"
"Reorder pages: 1, 3, 2, 4, 5"
"Reverse the page order"
Merge Operations
Basic Merge
## PDF Merge Plan
### Input Files
| Order | File | Pages | Size |
|-------|------|-------|------|
| 1 | cover.pdf | 1 | 50 KB |
| 2 | chapter1.pdf | 15 | 2.1 MB |
| 3 | chapter2.pdf | 22 | 3.4 MB |
| 4 | appendix.pdf | 8 | 1.2 MB |
### Output
- **Filename**: combined_document.pdf
- **Total Pages**: 46
- **Estimated Size**: ~6.7 MB
### Merge Options
- [ ] Add bookmarks for each source file
- [ ] Preserve original bookmarks
- [ ] Include blank page between files
- [ ] Optimize/compress output
Advanced Merge
## Advanced PDF Merge
### Custom Page Selection
| Source | Pages to Include | Insert Position |
|--------|------------------|-----------------|
| main.pdf | 1-10 | 1-10 |
| insert.pdf | All (5 pages) | After page 10 |
| main.pdf | 11-20 | 16-25 |
| appendix.pdf | 2-4 only | 26-28 |
### Output Configuration
- **Filename**: custom_merged.pdf
- **Page numbering**: Reset to 1 / Continue from original
- **Bookmarks**: Create from filenames / Preserve all
### Quality Settings
- Resolution: Original / Reduce to [X] DPI
- Compression: None / Low / Medium / High
Split Operations
Split by Range
## PDF Split Plan
### Source
- **File**: large_document.pdf
- **Total Pages**: 100
### Split Configuration
| Output File | Page Range | Pages |
|-------------|------------|-------|
| part1.pdf | 1-25 | 25 |
| part2.pdf | 26-50 | 25 |
| part3.pdf | 51-75 | 25 |
| part4.pdf | 76-100 | 25 |
### Naming Pattern
`[original_name]_part[N].pdf`
Split by Size
## Split by File Size
### Source
- **File**: huge_report.pdf
- **Total Pages**: 500
- **File Size**: 250 MB
### Target
- **Max file size**: 25 MB
- **Estimated splits**: ~10 files
### Output
| File | Pages | Actual Size |
|------|-------|-------------|
| report_001.pdf | 1-52 | 24.8 MB |
| report_002.pdf | 53-98 | 23.2 MB |
| ... | ... | ... |
Split by Bookmark
## Split by Bookmarks/Chapters
### Source Structure
- large_manual.pdf
- Chapter 1: Introduction (p.1)
- Chapter 2: Setup (p.15)
- Chapter 3: Usage (p.45)
- Chapter 4: Advanced (p.120)
- Appendix (p.180)
### Split Output
| File | Chapter | Pages |
|------|---------|-------|
| ch1_introduction.pdf | Introduction | 1-14 |
| ch2_setup.pdf | Setup | 15-44 |
| ch3_usage.pdf | Usage | 45-119 |
| ch4_advanced.pdf | Advanced | 120-179 |
| appendix.pdf | Appendix | 180-end |
Extract Specific Pages
## Page Extraction
### Source
- **File**: contract.pdf (20 pages)
### Pages to Extract
- [x] Page 1 (Cover)
- [x] Pages 5-7 (Terms)
- [x] Page 15 (Signatures)
- [x] Page 20 (Appendix A)
### Output
- **File**: contract_key_pages.pdf
- **Pages**: 6 total (1, 5, 6, 7, 15, 20)
Page Operations
Reorder Pages
## Page Reorder Plan
### Current Order
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
### New Order
1, 2, 4, 3, 5, 6, 8, 7, 9, 10
### Changes
- Page 3 ? Page 4 (swapped)
- Page 7 ? Page 8 (swapped)
Delete Pages
## Page Deletion
### Source
- document.pdf (25 pages)
### Pages to Remove
- Page 3 (blank page)
- Pages 12-14 (outdated section)
- Page 25 (draft watermark)
### Result
- New page count: 20
- Output: document_cleaned.pdf
Insert Pages
## Page Insertion
### Base Document
- main.pdf (10 pages)
### Insertions
| Insert | After Page | From |
|--------|------------|------|
| Cover page | 0 (beginning) | cover.pdf |
| Diagram | 5 | diagrams.pdf (page 2) |
| Appendix | 10 (end) | appendix.pdf |
### Result
- New page count: 14
Rotate Pages
## Page Rotation
### File: scanned_doc.pdf
### Rotations Needed
| Page(s) | Current | Rotation | New |
|---------|---------|----------|-----|
| 3 | Portrait | 90° CW | Landscape |
| 7-9 | Upside down | 180° | Correct |
| 15 | Landscape | 90° CCW | Portrait |
Batch Processing
Batch Merge
## Batch Merge Job
### Task: Merge PDFs by Project
### Folder Structure
/reports/ /project-a/ report1.pdf report2.pdf /project-b/ summary.pdf details.pdf
### Output
| Merged File | Sources |
|-------------|---------|
| project-a_combined.pdf | report1.pdf, report2.pdf |
| project-b_combined.pdf | summary.pdf, details.pdf |
Batch Split
## Batch Split Job
### Input
- /monthly_reports/ (12 files, each ~50 pages)
### Operation
- Split each file into 5-page chunks
### Output
- /monthly_reports_split/
- jan_001.pdf, jan_002.pdf, ...
- feb_001.pdf, feb_002.pdf, ...
- ...
Tool Recommendations
Free Tools
- PDF24: Web and desktop, full featured
- ILovePDF: Web-based, easy to use
- PDFsam Basic: Desktop, open source
- Preview (Mac): Built-in, drag and drop
Professional
- Adobe Acrobat Pro: Industry standard
- Foxit PDF Editor: Full featured
- Nitro Pro: Good for business
Command Line
- pdftk: Classic, powerful
- qpdf: Fast, scriptable
- pdfcpu: Modern Go-based tool
Limitations
- Cannot perform actual file operations (provides guidance)
- Password-protected PDFs need password first
- Very large files may need chunked processing
- Some PDFs with restrictions cannot be modified
- Merging different page sizes may cause issues
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
接班交班总结器:临床 EHR 自动化 - Openclaw Skills
Teacher AI 备课专家:K-12 自动化教案设计 - Openclaw Skills
专利权利要求映射器:生物技术与制药 IP 分析 - Openclaw Skills
生成 Tesla 车身改色膜:用于 3D 显示的 AI 图像生成 - Openclaw Skills
Taiwan MD:面向台湾的 AI 原生开放知识库 - Openclaw Skills
自学习与迭代演进:AI Agent 成长框架 - Openclaw Skills
HIPC Config Manager: 安全的 API 凭据处理器 - Openclaw Skills
Outline 知识库:用于文档的 AI agent 集成 - Openclaw Skills
MongoDB Slowlog Analysis: 优化数据库性能 - Openclaw Skills
Crazyrouter 翻译:AI 驱动的多模型翻译 - Openclaw Skills
AI精选
