1#!/bin/sh 2 3# gstopdf - Ghostscript-based PDF filter for CUPS 4# 5# Note: This is only a wrapper filter, the real work is done by gstoraster 6# 7# (C) 2012 Till Kamppeter <till.kamppeter@gmail.com> 8# 9# Released under GPL 2 or later 10# 11 12echo "DEBUG: gstopdf argv[$#] = $@" >&2 13echo "DEBUG: PPD: $PPD" >&2 14 15if [ $# -lt 5 -o $# -gt 6 ]; then 16 echo "ERROR: gstopdf job-id user title copies options [file]" >&2 17 exit 1 18fi 19 20# Read from given file. 21if [ -n "$6" ]; then 22 exec <"$6" 23fi 24 25OUTFORMAT=PDF $CUPS_SERVERBIN/filter/gstoraster "$1" "$2" "$3" "$4" "$5" 26