Programs needed for batch converting PDFs to an image file (pdf2jpg, pdf2jpeg, pdf2png):
Note: Once Ghostscript is installed, you might need to add it to your PATH environment variable. To do this in Windows, go to Control Panel -> System -> Advanced, Environment Variables. Then click “path” variable in System Variables and choose edit. Add Ghostscript’s bin path (ie: ;”c:\program files\gs856\gs8.56\bin”). All paths are semi-colon separated.
Then go to the directory your images are located using command prompt (Windows) or shell (Linux) and type a command like this:
mogrify -rotate 90 -scale 15% -format jpg *.PDF
This command rotates the PDF 90 degrees clockwise, scale it down to 15% of it’s original size and convert it to JPG (great for thumbnails).
WARNING: mogrify can overwrite your original images if you keep the same format, create a backup before pocessing them. See Mogrify Documentation.