How to Split PDFs in the Linux Terminal with PDFtk

To split a PDF from the Linux terminal with PDFtk, use burst to save every page as a separate PDF, or use cat to copy chosen pages into one new PDF. Both methods keep the source document intact when you give the output a different name. The examples below use one-based page numbers, so page 1 is the first page in the file.

Install PDFtk

On Debian and Ubuntu, install the current Java port packaged as pdftk-java. The package provides the pdftk command used in this guide:

sudo apt update
sudo apt install pdftk-java
pdftk --help

Debian lists pdftk-java in its stable repository, and Ubuntu provides it in the Universe component. On Fedora, openSUSE, Arch Linux, or another distribution, search your enabled distribution repositories for pdftk or pdftk-java and install the package built for your release. For example, search with dnf search pdftk, zypper search pdftk, or pacman -Ss pdftk. Treat AUR packages as community-maintained and review their build files before installing. Avoid the old fixed-version RPM commands in the source article: they point to openSUSE Leap 42.3 and legacy GCJ libraries.

For Debian and Ubuntu package details, see the Debian stable package page and Ubuntu 24.04 package page.

Prepare a working folder

Keep the source file and generated pages in a dedicated directory so the output is easy to find. Replace the sample path with the actual location of your PDF:

mkdir -p ~/Documents/pdf-work/split
cp "/path/to/annual-report.pdf" ~/Documents/pdf-work/
cd ~/Documents/pdf-work
Linux terminal in a PDF work folder with annual-report.pdf and a split directory visible
The working folder keeps the source PDF beside a separate folder for split pages.

If the filename contains spaces, keep it inside quotation marks when you use it in a command. PDFtk writes relative output paths from the directory shown in your terminal prompt.

Split every page into its own PDF

Run burst when you want a separate file for every page. Create the output directory first, then provide a numbered filename pattern:

pdftk annual-report.pdf burst output split/page_%03d.pdf

The %03d pattern numbers files with three digits, such as page_001.pdf, page_002.pdf, and page_003.pdf. This keeps alphabetical file listings in page order, including for documents with more than nine pages. PDFtk also writes a page-data report called doc_data.txt in the current working directory. Check the result with:

ls -1 split
Linux terminal showing PDFtk burst with a numbered output pattern and separate page PDF filenames
burst creates one numbered PDF per source page in the chosen output folder.

Extract a page range into one PDF

Use cat when the output should be one document containing a continuous range. This example copies pages 4 through 8 into a new file:

pdftk annual-report.pdf cat 4-8 output pages-4-through-8.pdf

The original PDF is unchanged; pages-4-through-8.pdf contains the requested pages in their original sequence. The PDFtk manual describes cat as assembling page ranges into an output document.

Linux terminal command extracting pages 4 through 8 from annual-report.pdf into a new PDF
This cat command makes one new PDF from pages 4–8.

Choose nonconsecutive pages

You can combine individual page numbers and ranges in a single command. The order in the output follows the order you list after cat:

pdftk annual-report.pdf cat 2-3 7 10-12 output selected-pages.pdf

That command creates one PDF containing pages 2, 3, 7, 10, 11, and 12. To extract a different sequence, change the numbers and ranges. To split only selected pages into individual files, use burst and keep the needed numbered outputs; cat always writes the selected pages together as one PDF.

Linux terminal command combining pages 2–3, page 7, and pages 10–12 into selected-pages.pdf
List page numbers and ranges in the sequence you want them to appear.

Check the output and avoid common mistakes

  • Use ls -1 split to review the burst files, or ls -lh pages-4-through-8.pdf selected-pages.pdf to confirm the named output files exist.
  • Choose a new output filename each time. Do not use the source PDF as the output path, and check whether a file with the target name already exists before running a command.
  • If the terminal says pdftk: command not found, confirm the package installed successfully and that the executable is on your PATH.
  • If PDFtk cannot open the input, check the working directory and filename. Quote names with spaces, for example "annual report.pdf".
  • For a password-protected PDF, PDFtk may require the appropriate password. Avoid putting a real password directly in a command that could be saved in shell history.
  • Splitting pages does not run OCR or turn scanned page images into searchable text. It copies pages into new PDF files.

For exact syntax, page-range rules, numbered burst output, and password options, consult the PDFtk Server manual and its command-line examples.

Leave a Comment

How to Record Speaker Output on Linux with Audacity

How to Record Speaker Output on Linux with Audacity

Capture Linux desktop audio in Audacity by routing its recording stream to your output device’s monitor source. Follow PulseAudio and PipeWire steps, export tips, and fixes for silent tracks.

How to Use Dropbox on Linux: Install and Sync Your Files

How to Use Dropbox on Linux: Install and Sync Your Files

Install Dropbox on Linux from the official package, sign in, sync a local folder, manage selective sync, and check status from the command line.

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

Install Inkscape from your Linux distribution’s repositories, the Ubuntu stable PPA, Snap, or Flathub, with current commands and notes for choosing a package source.

How to Find and Remove Duplicate Files on Linux With FSlint

How to Find and Remove Duplicate Files on Linux With FSlint

Use FSlint to scan selected Linux folders, review duplicate groups, and safely delete redundant files or learn when hard-link merging is appropriate.

How to Install SABnzbd on Linux and Configure It

How to Install SABnzbd on Linux and Configure It

Install SABnzbd on Ubuntu or Debian, or run it in Docker on another Linux host. Then open the web interface and configure your provider and download folders.

How to Install the Paper GTK Theme on Linux

How to Install the Paper GTK Theme on Linux

Install the Paper GTK theme from supported Linux repositories, enable it for GTK apps in GNOME Tweaks, and see what the legacy theme can and cannot change.

How to Install and Set Up Plex on OpenMediaVault with Compose

How to Install and Set Up Plex on OpenMediaVault with Compose

The old OpenMediaVault Plex plugin is archived. Set up Plex on OMV 8 with OMV-Extras, the Compose plugin, persistent storage, and Plex’s official container.

How to Clean and Speed Up Ubuntu Safely

How to Clean and Speed Up Ubuntu Safely

Clean and speed up Ubuntu with safe APT cleanup, storage checks, and startup controls that help free space and troubleshoot a sluggish desktop.

How to Install the Hiri Email Client on Linux

How to Install the Hiri Email Client on Linux

Install Hiri on Linux with its Snap package or official tarball, add a desktop launcher, and check supported accounts plus a warning about Hiri’s old Snap release.

How to Get System Specifications for a Linux PC

How to Get System Specifications for a Linux PC

Use Fastfetch and built-in Linux commands to check your distro, kernel, CPU, memory, graphics, storage, and connected devices, then save a clear report.