Last active
August 29, 2015 14:18
-
-
Save rubenwardy/30bfb1173f9afeecef82 to your computer and use it in GitHub Desktop.
Convert folder of images to PDF with filenames
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This batch file is specific to Linux. | |
# (the for, mkdir, rm etc commands may be done differently on your OS. | |
# the convert commands should be the same though) | |
# | |
rm /tmp/imageex -r | |
mkdir /tmp/imageex | |
for filename in *.png; do | |
echo "Processing $filename" | |
convert $filename -background White label:$filename -gravity Center -append -pointsize 14 /tmp/imageex/$filename.png | |
done | |
echo "Exporting to PDF..." | |
convert /tmp/imageex/*.png output.pdf | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment