Skip to content

Instantly share code, notes, and snippets.

@ongardie
Created October 2, 2013 21:10
Show Gist options
  • Save ongardie/6800587 to your computer and use it in GitHub Desktop.
Save ongardie/6800587 to your computer and use it in GitHub Desktop.
pdf2pcl
#!/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