How to convert PDF to PNG from the command line on a Mac
Instead of opening your PDF file with the Preview app (or other PDF reader) and export it to PNG, you can easily use the command line.
To do so, you need to use the sips (scriptable image processing system) command installed by default in Mac OS X. Open your terminal and run:
sips -s format png your_pdf_file.pdf --out your_png_file.png
The script also works for the jpeg format the same way.
UPDATE: this solution works for the first page of the PDF only (thanks Joe Papa for the feedback).
Source: New feed