diff options
author | Remi Collet <fedora@famillecollet.com> | 2011-12-27 16:50:50 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2011-12-27 16:50:50 +0100 |
commit | 65608e0f8bbc0190cc1b7646f653e796c807f02b (patch) | |
tree | 274ade8f5007bd7f9c252d8262637e0300363e82 /pstopdf |
import cups from F16
Diffstat (limited to 'pstopdf')
-rw-r--r-- | pstopdf | 55 |
1 files changed, 55 insertions, 0 deletions
@@ -0,0 +1,55 @@ +#!/bin/sh +# +# CUPS filter script for Ghostscript. +# +# Copyright 2001-2002 by Easy Software Products. +# Copyright 2006 by Hewlett-Packard Development Company, L.P. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# Installation directories... +prefix=/usr +exec_prefix=${prefix} +bindir=${exec_prefix}/bin + +# Set the library/font path... +GS_FONTPATH="$CUPS_FONTPATH" +export GS_FONTPATH + +# Options we use with Ghostscript... +gsopts="-dQUIET -dDEBUG -dPARANOIDSAFER -dNOPAUSE -dBATCH " +gsopts="$gsopts -dNOMEDIAATTRS -sDEVICE=pdfwrite -sstdout=%stderr" + +# See if we have a profile=n,n,n,n,n,n,n,n,n,n,n option... +profile="" +for option in $5; do + case $option in + profile=*) + profile="-scupsProfile=`echo $option | awk -F= '{print $2}'`" + ;; + esac +done + +# See if we have a filename on the command-line... +if test -z "$6"; then + ifile="-" +else + ifile="$6" +fi + +# Now run Ghostscript... +$bindir/gs $gsopts -sOUTPUTFILE="%stdout" $profile $ifile + |