pdf-toc-splitter

Split oversized PDFs into structure-aligned chunks with preserved bookmarks.

Updated Nov 8, 2025
One-click install
npx skills add https://github.com/berad217/human-training --skill pdf-toc-splitter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-toc-splitter
Source: https://github.com/berad217/human-training/tree/main/skills-source/pdf-toc-splitter
Command: npx skills add https://github.com/berad217/human-training --skill pdf-toc-splitter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymupdf, and includes assets (resource) components.

What problem does it solve?

Large PDFs are difficult to process, read, or ingest into AI systems due to their size, and manual splitting often loses document structure and bookmarks, making the resulting chunks hard to navigate.

Core Features & Use Cases

  • Structure-aware splitting: Split PDFs using their existing table of contents/bookmarks, inferred headings, fixed page counts, or manual break points.
  • Editable slice plans: Refine split boundaries by editing a simple JSON plan, enabling recursive subdivision of large sections without re-analyzing the full document.
  • Bookmark preservation: Each output chunk retains its relevant bookmarks, rebased to start at page 1 for easy navigation.
  • Use case example: Split a 2000-page industry standard into chapter-level PDFs for team reference, or break a large research paper into sections for RAG pipeline ingestion.

Quick Start

Use the pdf-toc-splitter skill to split the attached large PDF 'technical-manual.pdf' into chapter-sized chunks with preserved bookmarks.

Frequently Asked Questions about pdf-toc-splitter

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

FAQPage Schema
How do I split a large PDF into smaller chunks without losing bookmarks?

To split a large PDF without losing bookmarks, you need a structure-aware splitter that extracts the table of contents and rebases page references for each output chunk. This preserves navigation for chapter-level distribution.

How do I prepare large PDF documents for RAG pipeline ingestion?

Preparing large PDFs for RAG ingestion involves breaking the files into structure-aligned chunks. You can split documents using inferred headings or fixed-page counts to create smaller sections suitable for LLM processing.

Can I manually define page ranges to split a PDF into uneven sections?

Yes, you can manually define page ranges by generating and editing a JSON split plan. This allows you to set custom break points and recursively subdivide large sections without re-analyzing the full document.

Does PyMuPDF support extracting and rebuilding bookmarks for PDF chunks?

PyMuPDF supports extracting and rebuilding bookmarks for PDF chunks. It parses the document structure, extracts specific page ranges, and rebuilds the table of contents with correct page rebasing for each output.

What is the best way to divide a 2000-page industry standard into chapter-level PDFs?

The best way to divide a massive PDF into chapter-level files is using TOC-based splitting. This method uses the existing table of contents to create independent PDFs while retaining relevant bookmarks for team reference.

Why do manually split PDFs lose their table of contents structure?

Manually split PDFs lose their table of contents because page references become invalid when extracting subsets. A proper splitter rebases bookmarks to start at page 1, ensuring the navigation structure remains intact.