To create image thumbnails from a PDF document, run this in a terminal window:
convert -thumbnail x300 -background white -alpha remove input_file.pdf[0] output_thumbnail.png
for f in *.pdf; do convert -thumbnail x300 -background white -alpha remove "$f"[0] "${f%.pdf}.png"; done
-thumbnail
: optimizes png creation for speed and strips metadatax300
: Sets the thumbnail height, maintaining aspect ratio-background white
: Sets the background of the thumbnail to white-alpha remove
: Removes the alpha channel from the thumbnail outputinput_file.pdf
: the PDF file to use as input[0]
: The page number of the input file to use for the thumbnail