Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Converts all PDFs in the current folder to high-res PNGs.
#!/bin/bash
for pdf in *.pdf; do
png_name="${pdf%.pdf}.png"
echo "converting '$pdf' to '$png_name'"
convert -density 300 "$pdf" -background white -alpha remove -alpha off "$png_name"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment