pdftk
is a useful tool for manipulating pdf files.
To merge two or more pdf files (file1.pdf
, file2.pdf
,…) use the following command:
pdftk file1.pdf file2.pdf file3.pdf cat output merged.pdf
the file merged.pdf
is the concatenation of file1.pdf
, file2.pdf
and file3.pdf
Extract pages from 1 to 10 and from 12 to the end, and save the extracted pages on the file out.pdf
. Practically, this command removes page number 11.
pdftk input.pdf cat 1-10 12-end output out.pdf
pdftk input.pdf cat 1-endeast output out.pdf
To install pdftk
in Ubuntu 18.04 or newer you have to type the following command:
sudo snap install pdftk