Create thumbnail with ImageMagic

# rename JPG to jpg
for i in *.JPG; do
mv $i "${i%.JPG}.jpg"
done

# create thumbnails
for i in *.jpg; do
convert $i -pointsize 72 -quality 90 -resize 600x800 -unsharp 0x.5 ${i/.jpg/_tmb.jpg}
done

# create thumbnails from pdf
for i in *.pdf; do
convert $i -pointsize 72 -quality 90 -resize 140x200 -unsharp 0x.5 ${i/.pdf/_tmb.jpg}
done

# convert jpg to pdf
mkdir pdf
for i in *.jpg; do
convert $i -quality 70 -density 72x72 -sharpen "0x1" -page A4 pdf/${i/.jpg/.pdf}
done

# Links
http://www.imagemagick.org/Usage/thumbnails/