Skip to content

Instantly share code, notes, and snippets.

@seignovert
Last active September 29, 2019 00:09
Show Gist options
  • Save seignovert/4fc66b830bde9a3a931f7af2e6dbdcce to your computer and use it in GitHub Desktop.
Save seignovert/4fc66b830bde9a3a931f7af2e6dbdcce to your computer and use it in GitHub Desktop.
[PDF] Reduce PDF file size with GhostScript

How yo reduce PDF file size on a Unix system with GhostScript

gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -sOutputFile=output.pdf input.pdf

The following parameters for -dPDFSETTINGS can be edited with:

  • /screen – Lowest quality, lowest size
  • /ebook – Moderate quality
  • /printer – Good quality
  • /prepress – Best quality, highest size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment