Tizen 2.1 base
[platform/upstream/cups-filters.git] / filter / imagetops
1 #!/bin/sh
2
3 # $Id: $
4 #
5 # imagetops - This is a Image-to-PostScript filter for CUPS
6 #
7 # Note: This wrapper filter is only included for backward compatibility with
8 # certan custom configurations. It is not mentioned in any of the .convs
9 # files included in this package and therefore never used with the default
10 # configuration. It makes sure that third-party PPD files referring to
11 # imagetops explicitly or custom configurations (in /etc/cups/*.convs files)
12 # will not break.
13 #
14 # DO NOT create new PPD or .convs files using this filter! imagetops is
15 # DEPRECATED!
16
17 # (C) 2012 Till Kamppeter <till.kamppeter@gmail.com>
18 #
19 # Released under GPL 2 or later
20 #
21
22 PDF2PS=`which pdf2ps`
23
24 echo "DEBUG: imagetops argv[$#] = $@" >&2
25 echo "DEBUG: PPD: $PPD" >&2
26
27 if [ $# -lt 5 -o $# -gt 6 ]; then
28     echo "ERROR: $0 job-id user title copies options [file]" >&2
29     exit 1
30 fi
31
32 # Read from given file.
33 if [ -n "$6" ]; then
34     exec <"$6"
35 fi
36
37 `dirname $0`/imagetopdf "$1" "$2" "$3" "$4" "$5" | $PDF2PS - -