Forrest logo
back to the cpdf tool

cpdf:tldr:20cdc

cpdf: Split a document into ten-page chunks, writing them to `chunk001.pdf`, `chunk002.pdf`, etc.
$ cpdf -split ${path-to-document-pdf} -o ${path-to-chunk%%%-pdf} -chunk ${10}
try on your machine

This command is using the cpdf (Coherent PDF Command Line Tools) utility to split a PDF document into multiple chunks.

Here is the breakdown of the command:

  • cpdf: This is the command to call the cpdf utility.

  • -split ${path-to-document-pdf}: This flag specifies that the PDF document located at ${path-to-document-pdf} should be split.

  • -o ${path-to-chunk%%%-pdf}: This flag indicates the output directory and filename format for the resulting chunks. ${path-to-chunk} represents the path where the chunks will be saved, and %%% is a placeholder that will be replaced with a sequential number for each chunk. For example, if ${path-to-chunk} is /output/chunk, the resulting chunks will be saved as /output/chunk-1.pdf, /output/chunk-2.pdf, etc.

  • -chunk ${10}: This flag determines the size of each chunk. In this case, each chunk will contain 10 pages of the original PDF document.

Overall, this command will split the PDF document into chunks and save them with a specific naming pattern in the specified output directory. Each chunk will contain 10 pages of the original document.

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