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

The parameters to convert do the following things:

-thumbnailSimilar to -resize, but optimized for speed and strips metadata.
x300Make the thumbnail 300px tall, and whatever width maintains the aspect ratio.
-background whiteSets the thumbnail background to white.
-alpha removeRemoves the alpha channel from the thumbnail output.
input_file.pdfThe PDF file to use as input.
[0]The page number of the input file to use for the thumbnail.
output_thumbnail.pngThe output thumbnail file to create.

If you want larger thumbnails, just change the x300 parameter to match. If you want to output .jpg’s (or anything else, like .gif), just change the file …

Continue reading “How to create thumbnails for PDFs with ImageMagick on Linux”