Skip to content

Instantly share code, notes, and snippets.

@gitfvb
Last active January 6, 2024 22:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gitfvb/867cb8b64f99b5d0122c3b4b95ba7afd to your computer and use it in GitHub Desktop.
Save gitfvb/867cb8b64f99b5d0122c3b4b95ba7afd to your computer and use it in GitHub Desktop.
Compress PDF with ghostscript on Windows and DO NOT upload it somewhere in the cloud

You can use this example command in PowerShell or maybe CMD

& "C:\Program Files\gs\gs10.01.1\bin\gswin64c.exe" -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -dCompatibilityLevel="1.4" -dPDFSETTINGS=/screen -dEmbedAllFonts=true -dSubsetFonts=true -dColorImageDownsampleType=/Bicubic -dColorImageResolution=144 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=144 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=144 -sOutputFile="output.pdf" "input.pdf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment