This is an old revision of the document!
Table of Contents
PDF management
GS
Merge PDF files:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf
Split PDF file:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dFirstPage=m -dLastPage=n -sOutputFile=out.pdf in.pdf
PDFTK
Split and merge PDF files:
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
Encrypt/decrypt, set permissions, repair: http://www.accesspdf.com/article.php/20041129175231241
convert (image magick)
Merge image files into a pdf file:
convert page-*.png -page A4 [-rotate 90] test.pdf
pdftotext
To grep into a pdf file:
pdftotext file.pdf - | grep "text"
flpsed
To add text on a pdf file. You can save the file, but it doesn't work with landscape oriented pages…