Skip to content

Instantly share code, notes, and snippets.

@MaximBazarov
Created April 26, 2017 10:06
Show Gist options
  • Save MaximBazarov/3ce015b8290d71d40852f277141fc09f to your computer and use it in GitHub Desktop.
Save MaximBazarov/3ce015b8290d71d40852f277141fc09f to your computer and use it in GitHub Desktop.
PDF 72x72 resize
#!/usr/bin/env bash
echo "PDF Resize"
echo "Usage: $0 input-image.pdf output-image.pdf 100x100"
if [ $# -eq 0 ]; then
echo "No arguments provided"
exit 1
fi
gs -o $2 -sDEVICE=pdfwrite -dPDFFitPage -r72x72 -g$3 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment