summaryrefslogtreecommitdiff
path: root/tools/pcl2pdfwr
diff options
context:
space:
mode:
authorStefan Kemper <stefan.kemper@artifex.com>2001-07-10 22:22:39 +0000
committerStefan Kemper <stefan.kemper@artifex.com>2001-07-10 22:22:39 +0000
commit5f87b73025670a93fa5276cd1835bc1073a3e60d (patch)
tree4bf0311a2c0358fe5e3e0c9cf96468dafefcb069 /tools/pcl2pdfwr
parentbbd542bfb8ecd1e72c4ad5206f04769e5c9b1d30 (diff)
Adding convenience scripts for pcl to pdf conversion.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@1412 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'tools/pcl2pdfwr')
-rwxr-xr-xtools/pcl2pdfwr36
1 files changed, 36 insertions, 0 deletions
diff --git a/tools/pcl2pdfwr b/tools/pcl2pdfwr
new file mode 100755
index 000000000..00307a738
--- /dev/null
+++ b/tools/pcl2pdfwr
@@ -0,0 +1,36 @@
+#!/bin/sh
+# $RCSfile$ $Revision$
+# Convert PCL or PCL to PDF without specifying CompatibilityLevel.
+
+OPTIONS=
+while true
+do
+ case "$1" in
+ -?*) OPTIONS="$OPTIONS $1" ;;
+ *) break ;;
+ esac
+ shift
+done
+
+if [ $# -lt 1 -o $# -gt 2 ]; then
+ echo "Usage: `basename $0` [options...] (input.pcl|-) [output.pdf|-]" 1>&2
+ exit 1
+fi
+
+infile=$1;
+
+if [ $# -eq 1 ]
+then
+ case "${infile}" in
+ -) outfile=- ;;
+ *.pcl) base=`basename ${infile} .pcl`; outfile=${base}.pdf ;;
+ *.pxl) base=`basename ${infile} .pxl`; outfile=${base}.pdf ;;
+ *) base=`basename ${infile}`; outfile=${base}.pdf ;;
+ esac
+else
+ outfile=$2
+fi
+
+# We have to include the options twice because -I only takes effect if it
+# appears before other options.
+exec pcl6 $OPTIONS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite2 -sOutputFile=$outfile $OPTIONS $infile