Forrest logo
back to the qpdf tool


qpdf: Write each group of n pages to a separate output file with a given filename pattern.
$ qpdf --split-pages=n ${input-pdf} ${out_%d-pdf}
try on your machine

This command is using the 'qpdf' utility tool to split a PDF file into multiple individual PDF files.

Here is a breakdown of the command:

  • qpdf: This is the command to execute the 'qpdf' utility.
  • --split-pages=n: This is an option flag provided to the 'qpdf' utility, where 'n' is the number of pages you want to split from the input PDF file. For example, if 'n' is 3, it will split the input PDF into separate PDFs consisting of 3 pages each.
  • ${input-pdf}: This is a placeholder for the path or name of the input PDF file you want to split. You need to replace ${input-pdf} with the actual file name or path to the PDF file you want to split.
  • ${out_%d-pdf}: This is a placeholder for the desired names of the output PDF files generated after splitting. The %d will be replaced with numbers denoting the sequence of the output PDF files. For example, if the input PDF has 9 pages and you split it into 3-page chunks, this will generate three output PDF files with names like out_1.pdf, out_2.pdf, and out_3.pdf. You can replace ${out_%d-pdf} with your preferred naming convention.

To use this command, make sure you have the 'qpdf' utility installed on your system, and replace ${input-pdf} and ${out_%d-pdf} with the appropriate file names or paths according to your requirements.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the qpdf tool