Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.28 KB

README.md

File metadata and controls

48 lines (31 loc) · 1.28 KB

pdf2png

fast PDF to PNG bash converter

Quick and No Bullshit

What's This?

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.

Prerequisites

  • ImageMagick (If you don't have it, sudo apt-get install imagemagick should sort you out).
  • Install the pdf2png bash script in your local bin with good rights (chmod 700 pdf2png could be a good safekeeper).

Usage

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

Wanna Contribute?

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.

License

Use it how you like. This is public domain.

... It also means that if something crashes your computer, not my business ^^