File: pcl2pdfwr

package info (click to toggle)
ghostscript 10.05.1~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 93,508 kB
  • sloc: ansic: 908,895; python: 7,676; cpp: 6,534; cs: 6,457; sh: 6,168; java: 4,028; perl: 2,373; tcl: 1,639; makefile: 529; awk: 66; yacc: 18
file content (36 lines) | stat: -rwxr-xr-x 821 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# $RCSfile$ $Revision: 2063 $
# 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 gpcl6 $OPTIONS  -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfile $OPTIONS $infile