Skip to content

Instantly share code, notes, and snippets.

@twerp
Created November 2, 2017 13:34
Show Gist options
  • Save twerp/0765cb0b79f7d866802b2950d236eda1 to your computer and use it in GitHub Desktop.
Save twerp/0765cb0b79f7d866802b2950d236eda1 to your computer and use it in GitHub Desktop.
Use GhostScript (for Windows) to optimize a PDF doc
gswin64c.exe -o "%~n1-optimized.pdf" -sDEVICE=pdfwrite -dPDFSETTINGS=/default %1
gswin64c.exe -o "%~n1-optimized.pdf" -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress %1
@echo off
FOR %%a IN (*.pdf) DO call optimize.bat "%%a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment