extract-pdf-pages

Extract specified page ranges from PDFs into new PDF files.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/shuheikomatsuki/lab-seminar-skills --skill extract-pdf-pages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract-pdf-pages
Source: https://github.com/shuheikomatsuki/lab-seminar-skills/tree/main/extract-pdf-pages
Command: npx skills add https://github.com/shuheikomatsuki/lab-seminar-skills --skill extract-pdf-pages

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, and includes scripts (resource) components.

What problem does it solve?

This skill helps you extract a specific range of pages from a source PDF and save them as a separate PDF, simplifying document consolidation or redaction workflows.

Core Features & Use Cases

  • Flexible page selection: physical pages (single, range, comma-separated) or section-based ranges when the source includes a structured document; supports output directory control and auto-naming conventions.
  • Safe, reproducible extraction: validates inputs, resolves paths from seminar_config.yml, and creates the output file in a project-local pdfs directory.
  • Use Case: You have a textbook PDF and want to share only chapters 6.3.2 to 6.4.1 as a standalone file for a study group.

Quick Start

Save a new PDF by specifying a source PDF and the pages you want to extract, then run the extraction flow to produce the output.

Frequently Asked Questions about extract-pdf-pages

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract specific pages from a PDF file into a new document?

You can extract PDF pages by specifying single pages, ranges, or comma-separated lists, and the tool saves the selection as a new standalone PDF file with automatic naming conventions.

Can I extract a PDF section by chapter or heading instead of page numbers?

Yes, section-based extraction is supported when headings can be mapped to pages, allowing you to specify ranges by section rather than physical page numbers.

Do I need pypdf installed to extract pages from a PDF?

Yes, pypdf is a required dependency for this PDF page extraction tool, with optional pdftotext fallback support for section-based resolution.

What is the best way to automate sharing a specific PDF chapter for a study group?

Automating PDF chapter extraction is best done by validating input paths, resolving output directories via configuration files, and generating a standalone PDF for the selected page range.

Why does my PDF extraction fail when the source file path is invalid?

PDF extraction fails on invalid paths because the tool validates input paths and outputs helpful error messages, ensuring safe and reproducible extraction before processing.

How does the PDF page extraction tool handle output directory configuration?

The tool resolves output directories by integrating with a configuration file for pdf_sources and pdf_output_dir, automatically saving extracted pages to a project-local pdfs directory.