Created
March 16, 2015 19:59
-
-
Save drewsberry/af5468d5adf9842c4f11 to your computer and use it in GitHub Desktop.
Convert all eps files in folder to cropped pdf
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/zsh | |
files=(*) | |
for f in $files; do | |
if [[ $(echo $f | rev | cut -c1-3 | rev) == "eps" ]]; then | |
echo "Converting $f..." | |
basename=$(echo $f | rev | cut -c1-4 --complement | rev) | |
epspdf --bbox $f | |
pdfcrop --noverbose ${basename}.pdf ${basename}.pdf | |
fi | |
done | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment