User Tools

Site Tools

Return to Home page


pdftk is a useful tool for manipulating pdf files.

Merge 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 a range of pages from a 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

Rotate all the pages of a pdf of 90 degrees clockwise

pdftk input.pdf cat 1-endeast output out.pdf

Install pdftk in Ubuntu 18.04 or newer

To install pdftk in Ubuntu 18.04 or newer you have to type the following command:

sudo snap install pdftk

If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at]

You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url:
/web/htdocs/ · Last modified: 2020/11/26 23:18 (external edit)