gs file.pdf # show pdf file
pdftk 1.pdf 2.pdf 3.pdf cat output out.pdf # preserves bookmarks
gs -sDEVICE=pdfwrite -dColorConversionStrategy=/LeaveColorUnchanged -dDownsampleMonoImages=false -dDownsampleGrayImages=false -dDownsampleColorImages=false -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -o out.pdf in.pdf
gs -sDEVICE=pdfwrite -o merged.pdf in1.pdf in2.pdf # does not preserve bookmarks
gs -sDEVICE=pdfwrite -dNoOutputFonts -o out.pdf in.pdf # text to path
rsvg-convert -f pdf -o file.pdf file.svg
cpdf -twoup in.pdf -o out.pdf # merges 2 pages into one
qpdf --pages . 2-z -- in.pdf out.pdf # remove page 1
qpdf --pages in.pdf 2-z -- --empty out.pdf # remove page 1 and discards metadata
pdftk a.pdf dump_data > info.txt pdftk out.pdf update_info info.txt output final.pdf
pdftk A=a.pdf B=b.pdf cat A1-[N] B A[N+1]-end output out.pdf
eval `/Applications/DjView.app/Contents/setpath.sh` djvused -e print-outline book.djvu > toc.txt djvused -e 'set-outline toc.txt' book.djvu
scantailor
pdfimages -j -jp2 in.pdf out
for x in *.jpg; do c44 -dpi 300 $x; done; djvm -c out.djvu *.djvu # convert & merge greyscale images to djvu