Last active
December 17, 2015 11:59
-
-
Save munk/5606104 to your computer and use it in GitHub Desktop.
An OSX script for converting and joining jpegs to pdfs. Useful for combining scans into documents for a paperless office.
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 | |
MAX=$[$2+1] | |
for ((i = $1; i < $MAX; i++)) do | |
#echo "sips -s format pdf \"Scan $i.jpeg\" --out \"Scan$i.pdf\"" | |
sips -s format pdf "Scan $i.jpeg" --out "Scan$i.pdf" | |
done | |
PDFconcat="/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" | |
echo 'PDFconcat -s -o $3 Scan[$1-$2].pdf' | |
`"$PDFconcat" -s -o $3 Scan[$1-$2].pdf` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment