Last active
August 9, 2020 14:53
-
-
Save janosh/cb40f691e26f324ada59b8f6ea388a47 to your computer and use it in GitHub Desktop.
Bash script that accepts a directory as its single argument and creates small PNG previews of the first page of all PDFs using ImageMagick. Applies to PDFs in given directory and its subdirectories.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find $1 -type f -iname "*.pdf" -exec sh -c 'convert -density 100 -flatten "$1"[0] "$1".png' x {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment