Skip to content

Instantly share code, notes, and snippets.

@GM3D
Last active December 8, 2016 11:52
Show Gist options
  • Save GM3D/9d442e616b853b69433cfcb5ac533ba3 to your computer and use it in GitHub Desktop.
Save GM3D/9d442e616b853b69433cfcb5ac533ba3 to your computer and use it in GitHub Desktop.
shell script to convert a multi-page pdf to separate png images.
#!/bin/bash
fbody="$(basename "$1" .pdf)"
outfile="$(echo $fbody | sed -s s/-$//)"-p.png
convert -type Grayscale -density 600 -resample 100 -antialias "${fbody}.pdf" "$outfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment