Quick and No Bullshit
Got a heap of PDF files and need PNG previews? This script's got you covered. It goes through your directory, finds PDFs, and makes a PNG of the first page of each one. If the PNG already exists, it does jack squat because it's not stupid.
- ImageMagick (If you don't have it,
sudo apt-get install imagemagick
should sort you out). - Install the
pdf2png
bash script in your localbin
with good rights (chmod 700 pdf2png
could be a good safekeeper).
To convert all PDFs in the current directory:
pdf2png
To convert all PDFs in a specific directory:
pdf2png /path/to/the/directory
To convert all PDFs in a specific directory and all its subdirectories:
pdf2png /path/to/the/directory -r
To convert all PDFs in the current directory and all its subdirectories:
pdf2png . -r
Found a bug? Or maybe a way to make this thing even faster?
Please pull requests or open an issue, or fork it as you like.
Use it how you like. This is public domain.
... It also means that if something crashes your computer, not my business ^^