📄

PDF Split

Split a large PDF into individual pages or custom page ranges.

Document ⭐ Beginner ⏱️ 2 minutes

😫 The Pain Point

You received a 100-page report but only need pages 15-20 for your presentation. Or you need to extract each page as a separate file for distribution.

🚀 Agentic Solution

A PDF Splitter that extracts exactly the pages you need.

Key Features:

  • Page Ranges: Extract pages 1-5, 10, 15-20 in one command.
  • Individual Pages: Split entire document into one-page PDFs.
  • Batch Mode: Process multiple PDFs at once.

⚔️ Phase 1: Commander (Quick Fix)

For quick extraction.

Prompt:

“I have a PDF report.pdf. Write a Python script using pypdf to:

  1. Page Range: Extract pages 5-15 (1-indexed).
  2. Output: Save as extracted_pages.pdf.
  3. Alternative Mode: Split into individual pages (--split-all flag).

Handle invalid page ranges gracefully. Support password-protected PDFs.”

Result: Exactly the pages you need.

🏗️ Phase 2: Architect (Permanent Tool)

For Document Managers.

Engineering Prompt:

**Role:** Python Tool Developer
**Task:** Create a "PDF Splitter App".

**Requirements:**
1.  **GUI:**
    *   Select input PDF.
    *   Show total page count.
    *   Page range input (e.g., "1-5, 10, 15-20").
    *   Radio: Extract range vs Split all.
    *   "Split" button + Progress bar.

2.  **Logic:**
    *   Parse page range syntax.
    *   Validate against actual page count.
    *   Name output files logically.

3.  **Deliverables:**
    *   `pdf_split.py`
    *   `run.bat`, `run.sh`
    *   `requirements.txt`

🧠 Prompt Decoding

  • 1-indexed: PDF pages are typically numbered starting from 1, not 0.

🛠️ Instructions

  1. Copy Prompt → Run.
  2. Specify page range → Extract.

Related Workflows

Explore other categories

📬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

📖 Free eBook Guide 📦 7 Ready-to-use Scripts 🔔 Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.