Skip to content

Instantly share code, notes, and snippets.

@kevinmamaqi
Created January 17, 2020 08:55
Show Gist options
  • Save kevinmamaqi/0507a6d3c54130bf3753ca45fd6ef4c8 to your computer and use it in GitHub Desktop.
Save kevinmamaqi/0507a6d3c54130bf3753ca45fd6ef4c8 to your computer and use it in GitHub Desktop.
.SH script to optimize .PDF files in bulk inside a folder. #ghostscript
for f in *.pdf
do
echo $f;
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=a$f $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment