Forrest logo
back to the pdftk tool

pdftk:tldr:a54bc

pdftk: Split each page of a PDF file into a separate file, with a given filename output pattern.
$ pdftk ${input-pdf} burst output ${out_%d-pdf}
try on your machine

This command uses the "pdftk" tool to split a PDF document into multiple single-page PDF files.

Here's a breakdown of the command:

  • "pdftk": This is the name of the command-line tool to perform various operations on PDF files.

  • "${input-pdf}": This is a placeholder for the input PDF file path. You need to replace this with the actual path to the PDF file you want to split.

  • "burst": This is a command for the pdftk tool to split the input PDF file into individual pages.

  • "output": This keyword specifies the output file(s) pattern.

  • "${out_%d-pdf}": This is a placeholder for the output file(s) path pattern. Replace this with the desired output file path pattern. "%d" is a placeholder that will be replaced by the page number of each individual page, and "-pdf" is a suffix to indicate that the output files are PDF documents.

For example, if you run this command with an input PDF file called "mydoc.pdf", it will split "mydoc.pdf" into individual pages and name the output files as "out_1.pdf", "out_2.pdf", "out_3.pdf", and so on, for each page in the input PDF.

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 pdftk tool