pdftk dump_data to list bookmark page numbers, then extract each range.
Academic textbooks, research papers, legal documents, and ebooks often need to be split into individual chapters or sections. The challenge: splitting at bookmark boundaries requires knowing which page each chapter starts and ends on. Once you have that information, the actual splitting is straightforward.
This guide covers how to find bookmark page numbers and use that information to split a PDF accurately — whether you prefer a simple Chrome extension or a command-line approach.
Split PDFs by Chapter — Free
Specify any page range. Download in seconds. Files stay private.
Add to Chrome — FreeUnderstanding PDF Bookmarks
PDF bookmarks (also called the "outline" or "navigation panel") are a hierarchical list of named links to specific pages within the document. A well-structured PDF textbook might have bookmarks like:
Part I: Foundations
Chapter 1: Introduction (page 5)
Chapter 2: Core Concepts (page 23)
Chapter 3: Methods (page 41)
Part II: Applications
Chapter 4: Case Studies (page 67)
...
Not all PDFs have bookmarks. Scanned documents, many journal articles, and some presentations have no bookmark structure at all. In those cases, you rely on the table of contents pages.
Method 1: Manual Range Splitting with PDF Merge & Split
This works for any PDF, with or without bookmarks. The process:
- Find chapter page numbers — Open the PDF in Chrome. Either use the Bookmarks panel (View → Sidebar → Bookmarks in most PDF viewers) or read the Table of Contents page.
- Note the page ranges — Chapter 1: pages 5–22, Chapter 2: pages 23–40, etc.
- Extract each chapter — Use PDF Merge & Split to extract each range as a separate file.
Extracting one chapter with PDF Merge & Split
- Click the extension icon and open the Split tab.
- Add your PDF file.
- Enter the page range for the first chapter (e.g.,
5-22). - Click Split and save as
chapter-1.pdf. - Repeat for each chapter, entering the next range each time.
Method 2: Automatic Bookmark Splitting with pdftk
pdftk can read a PDF's bookmark structure and tell you the page number of each bookmark:
# List all bookmarks and their page numbers
pdftk input.pdf dump_data | grep -E "BookmarkTitle|BookmarkPageNumber"
This produces output like:
BookmarkTitle: Chapter 1: Introduction
BookmarkPageNumber: 5
BookmarkTitle: Chapter 2: Core Concepts
BookmarkPageNumber: 23
BookmarkTitle: Chapter 3: Methods
BookmarkPageNumber: 41
Use these page numbers to extract each section:
# Extract Chapter 1 (pages 5-22)
pdftk input.pdf cat 5-22 output chapter-1.pdf
# Extract Chapter 2 (pages 23-40)
pdftk input.pdf cat 23-40 output chapter-2.pdf
Method 3: Python Script for Automated Chapter Splitting
For a textbook with many chapters, a Python script can read bookmarks and split automatically:
import PyPDF2
with open("textbook.pdf", "rb") as f:
reader = PyPDF2.PdfReader(f)
outlines = reader.outline # Get bookmarks
def extract_bookmarks(outlines, page_count):
"""Extract top-level bookmark titles and page numbers"""
items = []
for item in outlines:
if isinstance(item, PyPDF2.generic.Destination):
page_num = reader.get_destination_page_number(item) + 1
items.append((item.title, page_num))
return items
bookmarks = extract_bookmarks(outlines, len(reader.pages))
# Split at each bookmark
for i, (title, start_page) in enumerate(bookmarks):
end_page = bookmarks[i+1][1] - 1 if i+1 < len(bookmarks) else len(reader.pages)
writer = PyPDF2.PdfWriter()
for page_num in range(start_page - 1, end_page):
writer.add_page(reader.pages[page_num])
safe_title = title.replace(" ", "-").replace("/", "-")
with open(f"{i+1:02d}-{safe_title}.pdf", "wb") as out:
writer.write(out)
Install PyPDF2 with pip install PyPDF2. This script reads the bookmarks, calculates page ranges, and extracts each chapter as a numbered PDF file.
What to Do When a PDF Has No Bookmarks
If a PDF has no bookmark structure (common with scanned documents and some academic papers), find chapter boundaries by:
- Table of contents page: Most books have a ToC listing chapters and page numbers — scroll to it and note the page numbers.
- Visual scanning: Scroll through the document looking for chapter title pages — the large-text "Chapter X" headers that appear at page breaks.
- Searching: Use Ctrl+F to search for "Chapter" or "Section" to find chapter headings and note their page numbers.
Split Your PDF by Chapter — Fast and Free
Any page range, any PDF. Works entirely inside Chrome.
Install PDF Merge & SplitRelated Guides
- How to Split a PDF by Page Numbers
- How to Extract Specific Pages from a PDF
- How to Batch Split Multiple PDFs at Once
Frequently Asked Questions
Can I split a PDF at bookmark boundaries automatically?
Yes, but only with tools that can read PDF bookmark metadata. Pdftk and Python's PyPDF2 library can read bookmarks and extract the corresponding page ranges. Basic tools let you manually specify page ranges based on the bookmark page numbers you look up first.
How do I find out what page number each chapter starts on?
Open the PDF in Chrome or any PDF viewer. If it has a bookmarks panel, click each chapter heading — the page number shows in the viewer. Alternatively, use: pdftk input.pdf dump_data | grep Bookmark to list all bookmark titles and their page numbers.
What if my PDF does not have bookmarks?
Identify chapter start pages manually by using the table of contents page or scrolling through the document. Then split by those page ranges using PDF Merge & Split or pdftk.
Does splitting a PDF remove the bookmarks from the extracted sections?
Basic split tools remove bookmarks from extracted pages since the bookmark tree references the full document's page structure. Advanced tools like QPDF and some Python PDF libraries can preserve bookmarks within extracted sections.
How do I split a PDF textbook into individual chapters?
Look up chapter start and end pages from the table of contents. For each chapter, use PDF Merge & Split (Split tab, enter page range) or pdftk (pdftk book.pdf cat 15-42 output chapter2.pdf). Repeat for each chapter.