combine PDFs
This will usually give MUCH lower filesizes than using imagemagick. Using
imagemagick will effectively convert each page to an image. Ghostscript instead
merges them properly, BUT you can run into font issues if you don't locally have
the fonts used in the source files:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf 3.pdf 4.pdf 5.pdf
PDF to txt
This will grab the text from a PDF and print it to STDOUT. It wont use OCR or
anything fancy if the PDF is just images:
gs -dBATCH -dNOPAUSE -sDEVICE=txtwrite -sOutputFile=- letter.pdf
remove first or last pages in a pdf
The dLastpage=10 option or dFirstPage=3 option allow specifying a start and
end page when processing a pdf.