Shell One-Liner : Make a thumbnail from pdf

Thumbnail a PDF from the command line with this Linux one liner


Note: This requires Requires Imagemagik

What the script does & how to use it

  1. cd to the image directory that you wish to make thumbnail of.  This is where the thumbnail of the PDF will appear.
  2. type in the script at the command line
  3. 125 is the height in pixels of the thumbnails (you can change the number for larger/smaller thumbnails).
  4. The [0] is to create a thumbnail for the first page only, if you don’t have the [0] it will create all the pages of the PDF.
  5. file.pdf is the name of the file, thumb.png is the thumbnail (which you can rename to anything you want).

Get more one liners here

How useful was this post?

Click on a star to rate it!

Average rating 4 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

Updated on