Howto configure generic text only printer
Bernd Krumböck
b.krumboeck at rewe-group.at
Fri Dec 29 14:00:10 PST 2006
Hi manu!
Try raw printing, or a system v interface script.
Look into the lpadmin man page on how to set this up.
example system v script (from Brandon) which has been posted on this list
some days ago:
#! /bin/bash
PATH=/bin:/usr/bin:/usr/sbin:/sbin export PATH # paranoia
job="$1"
user="$2"
title="$3"
copies="$4" # the only thing we actually use
options="$5"
shift; shift; shift; shift; shift
f=""
if [ $# = 0 ]; then
# save stdin to a temp file so we can print it properly
f="`mktemp /tmp/pjbXXXXXXXX`" || exit 1
cat >"$f"
set -- "$f" # so now it's a script argument
fi
# if you need to printf(1) escape sequences to set draft mode, etc., do so
here
: ${copies:=1}
for pf in "$@"; do # for each file argument
while [ $copies -gt 0 ]; do # for each requested copy, if people
print with "lp -nCOPIES ..."
cat "$pf"
printf "\f"
let copies--
done
done
if ! [ "x$f" = x ]; then
# clean up our temporary file from above
rm "$f"
fi
exit 0
(be careful with line breaks during comments)
best regards!
Bernd
More information about the cups
mailing list