------------------------------------------------------------------------ pdftk ... pdf tool kit (extracting and combinining pdf files) ------------------------------------------------------------------------ Useful URLs: https://www.linux.com/training-tutorials/manipulating-pdfs-pdf-toolkit/ https://www.pdflabs.com/docs/pdftk-cli-examples/ #combining pdf files $ pdftk file1.pdf file2.pdf cat output file12.pdf #extract range of pages (in this case pages 12-15) $ pdftk file1.pdf cat 12-15 output outfile.pdf #removing selected pages (10-25, in this instance) from a file $ pdftk file1.pdf cat 1-9 26-end output outfile.pdf # ... several files but with selective pages $ pdftk A=in1.pdf B=in2.pdf cat A1-10 B2 B5-7 output out.pdf #extracting all pages from a file $ pdftk input.file burst #one pdf file per page #collage scanned pages $ pdftk A=even.pdf B=odd.pdf shuffle A B output collated.pdf $ pdftk A=even.pdf B=odd.pdf shuffle A Bend-1 output collated.pdf $ pdftk in.pdf cat 1east 2-end output out.pdf #rotate only first page $ pdftk in.pdf caat 1-endsouth output out.pdf #rotate all pages by 180 degrees #apply background watermark #repair corrupted files