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