Cara Compress ukuran pdf di linux ubuntu 16.04

11.4.18 Ilham S.Putra 0 Comments

Native solutions

  • Ghostscript is a great tool for compressing PDFs. In our tests it delivered the best compression ratio. Simply run:
Use the following ghostscript command:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
  • -dPDFSETTINGS=/screen lower quality, smaller size.
  • -dPDFSETTINGS=/ebook for better quality, but slightly larger pdfs.
  • -dPDFSETTINGS=/prepress output similar to Acrobat Distiller "Prepress Optimized" setting
  • -dPDFSETTINGS=/printer selects output similar to the Acrobat Distiller "Print Optimized" setting
  • -dPDFSETTINGS=/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file
  • Run the Shrinkpdf script:
    $ ./shrinkpdf in.pdf out.pdf
    The script is almost same as the explicit gs command above. However, it has one advantage – it does an output file size check.
  • qpdf:  A cmdline program that does structural, content-preserving changes to PDF files. The simplest way to invoke it:
    $ qpdf --linearize input.pdf output.pdf
    However, this didn’t provide a very optimized output in our tests.
    To install qpdf on Ubuntu, run:
    $ sudo apt-get install qpdf
  • smpdf is a commercial closed source tool. However, there is an evaluation copy available for download which adds an unlicensed version mark to the modified document. Usage:
    $ smpdf in.pdf -o out.pdf

0 komentar: