1
0
mirror of https://github.com/tiyn/wiki.git synced 2026-09-13 18:41:35 +02:00
Files
wiki/wiki/linux/pdftk.md
2025-10-26 07:28:42 +01:00

1.1 KiB

pdftk

pdftk is a port of the original PDFtk which is a command-line tool for scripting or processing PDFs.

Setup

The pdftk program can be installed from source as described on GitLab. Alternatively many Linux package managers package pdftk in the pdftk.

Usage

This section addresses the usage of pdftk.

Ommit pages at the Start or End of a PDF

pdftk can be used to ommit pages at the start or end of a pdf. This is done by the following command. <input-file> is the input file while <output-file> is the path the newly generated file is saved to. <start> is the first page to include in the output PDF document while <end> is the last one.

pdftk <input-file> cat <start>-<end> output <output-file>

The following command saves the content of the input file skript.pdf from the second to the last page to the output file skript-new.pdf.

pdftk skript.pdf cat 2-end output skript-new.pdf