Convert PDF to image with high resolution
I really haven't had good success with convert (update May 2020: actually: it pretty much never works for me), but I've had EXCELLENT success with pdftoppm. Here's a couple examples of producing high-quality images from a PDF:
(Produces ~25 MB-sized files per pg) Output uncompressed .tif file format at 300 DPI into a folder called "images", with files being named pg-1.tif, pg-2.tif, pg-3.tif, etc:
mkdir -p images && pdftoppm -tiff -r 300 mypdf.pdf images/pg
(Produces ~1MB-sized files per pg) Output in .jpg format at 300 DPI:
mkdir -p images && pdftoppm -jpeg -r 300 mypdf.pdf images/pg
(Produces ~2MB-sized files per pg) Output in .jpg format at highest quality (least compression) and still at 300 DPI:
mkdir -p images && pdftoppm -jpeg -jpegopt quality=100 -r 300 mypdf.pdf images/pg
brew install poppler