Skip to content

Instantly share code, notes, and snippets.

@chtzvt
Last active September 25, 2023 18:35
Show Gist options
  • Save chtzvt/a6fc24b0c5e9d7f978af110f9600c525 to your computer and use it in GitHub Desktop.
Save chtzvt/a6fc24b0c5e9d7f978af110f9600c525 to your computer and use it in GitHub Desktop.
PDF conversion commands
# .pdf to .pdf - 90+% compression ratio (lossy)
find . -type f -iname "*.pdf" -exec gs -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -sOutputFile={}.optimized.pdf {} \;
# .ai to .pdf - 90+% compression ratio
find . -type f -iname "*.ai" -exec gs -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -sOutputFile={}.optimized.pdf {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment