2 examples for gs

{{ score }}
  # ghostscript extracts images from a PDF as BMP with 600dpi
gs -dNOPAUSE -sDEVICE=bmp16m -sOutputFile=%d.bmp -r600 -q "input.pdf" -c quit
        
{{ score }}
  # 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