On Wed, 5 Jun 2002, Jeroen Diederen wrote: > thank you very much, I already found this one yesterday !!! The script provided here >does > not yet work....
Try the version I'm attaching. I can't really test it since I don't have such a printer. I just changed the argument test, and made the call to pap use an absolute path. The printer URI should be: pap://PrinterName/ including the trailing slash. Not sure if CUPS needs the / but it looks safer this way (=. You need to put the file in /usr/lib/cups/backend, make it executable, and restart the cups daemon (/etc/init.d/cups stop; /etc/init.d/cups start). There's also a version written in perl at http://www.srz-berlin.de/~bla/cups/backend/pap/pap Christiaan
#!/bin/sh # # Usage: PAP job user title copies options [filename] # # No arguments means show available devices... if test "$#" = 0; then echo "network pap \"Unknown\" \"Appletalk printer\"" exit 0 fi user=$2 copies=$4 device=`expr $DEVICE_URI : 'pap://\(.*\)/$'` if test $# = 5; then # Get print file from stdin; copies have already been handled... file=/var/tmp/$$.prn copies=1 cat > $file else # Print file is on command-line... file=$6 fi while [ $copies -gt 0 ]; do /usr/bin/pap -p $device $file copies=`expr $copies - 1` done # Remove any temporary files... if test $# = 6; then /bin/rm -f $file fi exit 0