compress pdf in linux code example
Example 1: how to compress pdf in linux
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed_PDF_file.pdf input_PDF_file.pdf
Example 2: pdf compressor linux
ps2pdf -dPDFSETTINGS=/ebook input.pdf output.pdf
Example 3: linux compress a pdf
ps2pdf large.pdf small.pdf