Skip to content

Instantly share code, notes, and snippets.

@egoes
Last active August 29, 2015 14:00
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 egoes/11253433 to your computer and use it in GitHub Desktop.
Save egoes/11253433 to your computer and use it in GitHub Desktop.
Make jpegs out of a pdf file. Put in .bash_profile or .bashrc and call 'makejpg 72 file.pdf'
# Ghostscript function to make jpegs out of a pdf file
domakejpg() {
gs -dSAFER \
-sDEVICE=jpeg \
-r$1 \
-dJPEGQ=90 \
-dTextAlphaBits=4 \
-dGraphicsAlphaBits=4 \
-dUseTrimBox \
-o page%02d.jpg $2
}
alias makejpg=domakejpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment