Skip to content

Instantly share code, notes, and snippets.

@robinp
Created February 10, 2019 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robinp/737719fde0b9b804af9224e2abec9f8e to your computer and use it in GitHub Desktop.
Save robinp/737719fde0b9b804af9224e2abec9f8e to your computer and use it in GitHub Desktop.
Converting image dirs to pdf using imagemagick on Windows
for /D %%f in (*) do (
cd %%f
mkdir annotated
magick mogrify -path annotated -set filename:xxx %%t -fill black -undercolor white -gravity southwest -pointsize 24 -annotate +0+0 "%%[filename:xxx]" *png *jpg
magick convert annotated/* ../%%~nf.pdf
rm -r annotated
cd ..
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment