2N/A# The contents of this file are subject to the terms of the 2N/A# Common Development and Distribution License (the "License"). 2N/A# You may not use this file except in compliance with the License. 2N/A# See the License for the specific language governing permissions 2N/A# and limitations under the License. 2N/A# When distributing Covered Code, include this CDDL HEADER in each 2N/A# If applicable, add the following below this CDDL HEADER, with the 2N/A# fields enclosed by brackets "[]" replaced with your own identifying 2N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2N/A# To configure this interface script under Solaris LP use the following 2N/A# lpadmin -p printer -v /dev/... -I"postscript,pdf" -Tunknown \ 2N/A# -o GS_DEVICE=(gs-device-type) \ 2N/A# [-o RESOLUTION=XxY] [-o banner-type=(ascii|postscript)] \ 2N/A# [-o GS_OPTIONS="-sIjsServer=... -sIjsParams=..."] 2N/A# see gs(1) for more information about values that can be used for 2N/A# GS_DEVICE, PAPERSIZE, and RESOLUTION, and GS_OPTIONS. 2N/A# There is a known problem printing through a /dev/lp? parallel port 2N/A# on a Solaris x86 machine. If you have selected the correct GS_DEVICE 2N/A# and get garbled output when printing under this configuration, running 2N/A# "lpadmin -p printer -H nopush" 2N/A# should fix the problem. 2N/A "wrong number of arguments to interface program" 1>&
2 echo "wrong number of arguments to interface program" 1>&
2 tag=
"GSinterface: ${request_id}" echo "`expr \"$1\" : \"^[^=]*=\(.*\)\"`" "unrecognized \"-o ${i}\" option, ignored" 1>&
2 if [
"${OutputFile}" =
"" ] ;
then # Don't pause between pages, exit upon completion, don't print startup and # page messages, don't allow deletefile, rename, or write access to files GS_OPTIONS=
"-dNOPAUSE -dBATCH -dQUIET -dSAFER ${GS_OPTIONS}" # Generate an ASCII banner page and pass it to the printer # This is much faster than the PostScript(TM) banner # Generate a PostScript(TM) banner page and run it through GhostScript. # This assumes an 8.5x11 page size. cat <<EOF | gs - 2>> ${error_file} /PrintLine { exch findfont exch scalefont setfont moveto show } def newpath 4 setlinewidth 1 setlinejoin 15 760 moveto 595 760 lineto 595 585 lineto 15 585 lineto closepath gsave .75 setgray fill grestore (${user_name}) 30 730 /Times-Bold 24 PrintLine (${request_id}) 415 730 /Times-Bold 24 PrintLine (${printer}) 30 600 /Times-Bold 16 PrintLine (`date`) 350 600 /Times-Roman 16 PrintLine (${title}) 100 660 /Times-Bold 36 PrintLine (Copies: ${copies}) 30 25 /Times-Roman 16 PrintLine # a simple text or PCL banner would be prefered, because a PS one # would require GhostScript to RIP and pass the whole image to the (eval "${banner}" 1>&3 2>&1) |
lp.cat 0