Created
May 22, 2010 03:58
-
-
Save lionelyoung/409750 to your computer and use it in GitHub Desktop.
Converts an image to PDF. Useful for making PDF images for use in Latex.
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 | |
if [ ! -f "$1" ] ; then | |
echo "Input file $1 doesn't exist" | |
exit 1 | |
fi | |
TITLE=${1%%.*} | |
#echo $TITLE | |
mogrify -format eps $1 && epstopdf $TITLE.eps | |
echo Conversion of $TITLE done! | |
if [ -f $TITLE.eps ] ; then | |
rm -v $TITLE.eps | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment