Created
October 2, 2013 21:10
-
-
Save ongardie/6800587 to your computer and use it in GitHub Desktop.
pdf2pcl
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/sh | |
# Convert PDF to PCL. | |
if [ $# -eq 2 ] | |
then | |
outfile=$2 | |
elif [ $# -eq 1 ] | |
then | |
outfile=`basename "$1" \.pdf`.pcl | |
else | |
echo "Usage: `basename \"$0\"` input.pdf [output.pcl]" 1>&2 | |
exit 1 | |
fi | |
exec gs -q -dNOPAUSE -dBATCH -P- -dSAFER -sDEVICE=pxlcolor "-sOutputFile=$outfile" -c save pop -f "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment