PDF komprimieren
ps2pdf -dPDFSETTINGS=/ebook 
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed_PDF_file.pdf input_PDF_file.pdf
for i in *.pdf; do 
	gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$i.compressed $i; 
done
for i in *.compressed; do 
	mv $i `basename $i .compressed`; 
done
PDF nach JPG
for i in *.pdf; 
do 
	pdftoppm -jpeg -r 600  $i -o `$i basename [pdf](.pdf)`.jpg; 
done
	pdftoppm -jpeg -r 600 Brief.pdf Bild 

Alle JPGs in eine PDF kombinieren

	img2pdf *.jp* --output combined.pdf
PDF Passwort entfernen
    qpdf --password=YOURPASSWORD-HERE --decrypt input.pdf output.pdf
PDF umsortieren von hinten nach vorne
pdftk i.pdf cat end-1 output o.pdf	
Metadaten entfernen

Exiftool

exiftool -all:all= foo.pdf

QPDF

qpdf --linearize foo.pdf bar.pdf

Mat2

mat2 --show filename.pdf  # this will show the metadata that will be removed, if any (similar to dry run) 
mat2 filename.pdf  # you will now end up with a file called filename.cleaned.pdf
mat2 --inplace filename.pdf  # this will overwrite original file with the new one, effectively removing the original file