Created
February 1, 2012 17:56
-
-
Save mdekstrand/1718328 to your computer and use it in GitHub Desktop.
Generate thumbnails of PDF files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for file in "$@"; do | |
outfile="${file%%.pdf}.jpg" | |
echo "Thumbnailing $file to $outfile" | |
convert -resize 300 "$file[0]" "$outfile" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script creates JPEG thumbnails of PDF files using ImageMagick. Just pass the PDF files on the command line, and it will thumbnail them to corresponding
.jpg
files: