Forrest logo
tool overview
On this page you find all important commands for the CLI tool pdftk. If the command you are looking for is missing please ask our AI.

pdftk

PDFTK (PDF Toolkit) is a command line tool used for manipulating PDF files. It provides various features to perform tasks such as merging, splitting, encrypting, decrypting, repairing, and extracting information from PDFs.

One of the main functionalities of PDFTK is merging multiple PDFs into a single document. This can be done by specifying the input files and providing an output filename. PDFTK can also rearrange pages within a PDF by specifying the page range or individual pages to be included.

Splitting a PDF into multiple smaller documents is another feature of PDFTK. This can be achieved by specifying the input PDF and the pages to be extracted as separate output PDFs.

Encryption and decryption options are available in PDFTK to protect PDFs with passwords. It supports both owner and user passwords, allowing restriction on document permissions like printing, copying, and modifying.

PDFTK can also be used to repair and optimize corrupted PDF files. It automatically handles issues such as missing objects, incorrect cross-references, and damaged fonts.

Extracting data from PDFs is another functionality of PDFTK. It can extract specific pages, form fields, and metadata from PDFs, providing flexibility to access and reuse the required information.

PDFTK supports various platforms including Windows, macOS, and Linux, making it versatile for different operating systems.

The command line interface of PDFTK allows for easy automation and integration into scripts and workflows, making it ideal for bulk operations on PDF files.

PDFTK is an open-source tool released under the GNU General Public License (GPL), allowing developers and users to modify, distribute, and customize its functionality.

PDFTK has a comprehensive documentation and a large user community, providing resources, guides, and support for troubleshooting and advanced usage.

List of commands for pdftk:

  • pdftk:tldr:4815d pdftk: Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one.
    $ pdftk ${input-pdf} cat ${1-3 5 6-10} output ${output-pdf}
    try on your machine
    explain this command
  • pdftk:tldr:6d69a pdftk: Merge (concatenate) a list of PDF files and save the result as another one.
    $ pdftk ${file1-pdf file2-pdf ---} cat output ${output-pdf}
    try on your machine
    explain this command
  • 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
    explain this command
tool overview