Skip to content

Instantly share code, notes, and snippets.

@hurricup
Last active November 3, 2022 04:30
Show Gist options
  • Save hurricup/257a2dbef1eefd8832ba4e4cd67e3e72 to your computer and use it in GitHub Desktop.
Save hurricup/257a2dbef1eefd8832ba4e4cd67e3e72 to your computer and use it in GitHub Desktop.
HowTo: convert multiple pdfs to png from the command line using ImageMagic
for file in *.pdf; do \
convert \
-density 600 \
-background white \
-alpha remove \
-alpha off \
"${file%%.*}.pdf" \
-resample 200 \
"${file%%.*}_%02d.png";\
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment