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