]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | #!/bin/sh |
2 | # | |
3 | # "$Id: pstopxl.in 4493 2005-02-18 02:09:53Z mike $" | |
4 | # | |
5 | # CUPS PCL XL/PCL 6 filter script for Ghostscript. | |
6 | # | |
7 | # Copyright 2001-2005 by Easy Software Products. | |
8 | # | |
9 | # This program is free software; you can redistribute it and/or modify | |
10 | # it under the terms of the GNU General Public License as published by | |
11 | # the Free Software Foundation; either version 2, or (at your option) | |
12 | # any later version. | |
13 | # | |
14 | # This program is distributed in the hope that it will be useful, | |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | # GNU General Public License for more details. | |
18 | # | |
19 | # You should have received a copy of the GNU General Public License | |
20 | # along with this program; if not, write to the Free Software | |
21 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
22 | # | |
23 | ||
24 | # Installation directories... | |
25 | prefix=@prefix@ | |
26 | exec_prefix=@exec_prefix@ | |
27 | bindir=@bindir@ | |
28 | ||
29 | # Set the library/font path... | |
30 | GS_LIB="${CUPS_FONTPATH:=/usr/share/cups/fonts}" | |
31 | export GS_LIB | |
32 | ||
33 | # Determine the PCL XL/PCL 6 driver to use... | |
34 | if test "x$PPD" != x; then | |
35 | colordevice=`grep '^*ColorDevice:' "$PPD" | awk -F: '{print $2}'` | |
36 | case "$colordevice" in | |
37 | *True* | *true*) | |
38 | device="pxlcolor" | |
39 | ;; | |
40 | *) | |
41 | device="pxlmono" | |
42 | ;; | |
43 | esac | |
44 | else | |
45 | device="pxlmono" | |
46 | fi | |
47 | ||
48 | # Options we use with Ghostscript... | |
49 | gsopts="-dQUIET -dDEBUG -dPARANOIDSAFER -dNOPAUSE -dBATCH" | |
50 | gsopts="$gsopts -dNOMEDIAATTRS -sDEVICE=$device -sstdout=%stderr" | |
51 | ||
52 | # See if we have a filename on the command-line... | |
53 | if test -z "$6"; then | |
54 | ifile="-" | |
55 | else | |
56 | ifile="$6" | |
57 | fi | |
58 | ||
59 | echo INFO: Starting ESP Ghostscript 7.07.1... 1>&2 | |
60 | echo DEBUG: Running $bindir/@GS@ $gsopts -sOUTPUTFILE="%stdout" "$ifile" 1>&2 | |
61 | ||
62 | # Now run Ghostscript... | |
63 | $bindir/@GS@ $gsopts -sOUTPUTFILE="%stdout" "$ifile" | |
64 | ||
65 | # | |
66 | # End of "$Id: pstopxl.in 4493 2005-02-18 02:09:53Z mike $". | |
67 | # |