shiva@well.sf.ca.us (Kenneth Porter) (05/20/91)
I have the following code in my printer's if filter (installed in the if field of printcap). The if filter expects to get the PostScript file as standard input and the printer as standard output. Put this at the top of the filter before the actual file is copies to stdout with cat. Ken (shiva@well.sf.ca.us) ================================================================ #!/bin/sh # next line controls whether file and host gets put in printer's front panel # (NEC Silentwriter LC-890 code for this is invoked) FPSUPPORT=LC-890 if [ "$FPSUPPORT" = LC-890 ] then echo "statusdict begin ( UP)( SETTING) setfpdisplay end" fi # # Extract info about file from config file # SPOOLDIR=. LOCKF=$SPOOLDIR/lock CFFILE=`grep cf $LOCKF` FILENAME=`grep '^N' $CFFILE | cut -c2-` FPS1=\(`basename "$FILENAME" | sed -e "y/./ /" | capitalize -u`\) CLASS=`grep '^C' $CFFILE | cut -c2-` FPS2=\(`echo $CLASS | capitalize -u`\) # Put jobname in printer display if [ "$FPSUPPORT" = LC-890 ] then echo "statusdict begin /jobname ($FILENAME) def end" echo "statusdict begin /jobsource $FPS2 def end" sleep 1 echo "/putjobtofp {statusdict begin $FPS1 $FPS2 setfpdisplay end} def" echo "putjobtofp" # next is so that "status-printing" gets reset # to jobname after paper feed echo "/showpage dup load type /operatortype eq" echo "{ { //showpage putjobtofp } }" echo "{ { //showpage exec putjobtofp } }" echo "ifelse bind def" fi ..