Created
September 1, 2020 18:00
-
-
Save Raudcu/df96d63a6f0bec504489195be61d5d46 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# Script to convert multiple images to pdf and put them together into a single file. | |
# It executes in the directory where the images are: topdf IMG_1.jpg IMG_2.JPG IMG_3.jpeg OUTPUT_NAME | |
declare -a Files=("${@:1:$(( $#-1 ))}") | |
for file in ${Files[@]} | |
do | |
convert $file ${file%.*}.pdf | |
converted+=(${file%.*}.pdf) | |
done | |
pdftk ${converted[*]} output ${@: -1}.pdf | |
rm -r ${converted[*]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment