Reduce PDF docs size on linux


SUBMITTED BY: Guest

DATE: Nov. 22, 2012, 4:24 a.m.

FORMAT: Bash

SIZE: 550 Bytes

HITS: 1225

  1. By producing pdfs by your own (maybe from word processor or other software) almost always you will obtain documents that are more Kbts avids than needed. Here's posted a single bash command line that will stream down the pdf size.
  2. Before some concrete results I've obtained:
  3. A 1.2M --> 97k
  4. B 1,2M --> 120k
  5. C 1,5M --> 152k
  6. D 1,6M --> 97k
  7. E 3,0M --> 253k
  8. F 787k --> 50k
  9. and so on...
  10. The code:
  11. gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

comments powered by Disqus