smithery/sheng-jie

split-pdf

Split PDF files into separate single-page documents or extract specific page ranges. Use when you need to divide a PDF into multiple files, extract particular pages, or process PDF pages individually. Works with multi-page PDF documents.

Installation

$ npx skills add smithery/sheng-jie --skill split-pdf

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseMIT

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,667 B
  • docs SUMMARY.md 254 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Split PDF

将 PDF 文件拆分为多个单页文件或提取指定页面范围。

使用场景

  • 将多页 PDF 拆分为独立的单页文件
  • 提取 PDF 的特定页面范围
  • 需要单独处理 PDF 各个页面时

使用方法

使用 scripts/split-pdf.cs 脚本进行 PDF 拆分:

拆分所有页面

dotnet scripts/split-pdf.cs input.pdf output-dir/

拆分指定页面范围

# 拆分第 1-5 页
dotnet scripts/split-pdf.cs input.pdf output-dir/ 1-5

# 拆分第 10-20 页
dotnet scripts/split-pdf.cs input.pdf output-dir/ 10-20

示例

# 将 document.pdf 的所有页面拆分到 pages/ 目录
dotnet scripts/split-pdf.cs document.pdf pages/

# 只提取前 3 页
dotnet scripts/split-pdf.cs document.pdf output/ 1-3

输出格式

拆分后的文件命名格式:{原文件名}page{页码}.pdf

例如,拆分 report.pdf 后会生成:

  • reportpage001.pdf
  • reportpage002.pdf
  • reportpage003.pdf
  • ...

依赖项

脚本使用以下 NuGet 包(已在脚本中声明):

  • PdfSharpCore 1.3.65 - PDF 操作核心库
  • Spectre.Console 0.49.1 - 美化的控制台输出

注意事项

  • 页码从 1 开始计数
  • 如果指定的页面范围超出实际页数,会自动调整到有效范围
  • 输出目录不存在时会自动创建
  • 支持中文文件名和路径