# ghostscript extracts images in input.pdf from page 1 to page 10 as JPEG compressed to 98 with 300dpi (good quality) # and name each file as number.jpg gs -dNOPAUSE -sDEVICE=jpeg -dFirstPage=1 -dLastPage=10 -sOutputFile=%d.jpg -dJPEGQ=98 -r300 -q intput.pdf -c quit