Skip to content

Instantly share code, notes, and snippets.

@keinwort
Forked from wikrie/shrink-pdf.sh
Created February 4, 2018 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keinwort/943ec3e04ce564785bc6c1f39541903c to your computer and use it in GitHub Desktop.
Save keinwort/943ec3e04ce564785bc6c1f39541903c to your computer and use it in GitHub Desktop.
shrink size of a pdf file terminal edition
#!/bin/bash
read -e -p "Please insert file: " file
if test -e $file
then pdf2ps $file tmp.ps && ps2pdf tmp.ps $file-small.pdf && rm tmp.ps
else echo "File not found!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment