FreeBSD6 or samba, printing blank end page

Dave dmehler26 at woh.rr.com
Sat Apr 8 19:51:52 UTC 2006


Hello,
    I've got a Freebsd6 print server that has two printers attached to it, 
both hp models one a deskjet the other a laserjet. Both are exhibiting the 
same behavior, whenever i print something from a windows box, xp in this 
case, the windows boxes use windows printer drivers and samba3 for this, the 
document i want is printed and removed from the unix print queue no problem. 
The issue, minor though annoying, is at the end of every document the 
printer ejects the last page as it should, but then i get one blank page 
spat out of the printers. I am unsure how to debug this, if it's samba, or 
freebsd or the unix script i am using for unix to talk to the printer. Any 
help appreciated. My config is below.
Thanks.
Dave.

/etc/printcap(only one printer displayed for brevity)
deskjet|lp|hp|Hulett Packard Deskjet 5550 printer:\
 :sh:sd=/var/spool/deskjet5550:lp=/dev/lpt0:\
 :if=/usr/local/libexec/ifhp:lf=/var/log/lpd-errs:\
 :tf=/usr/local/libexec/pstf:

deskjet-r|lp1|hp-raw|Hulett Packard Deskjet 5550 printer-raw:\
 :sh:sd=/var/spool/deskjet5550-raw:lp=/dev/lpt0:\
 :lf=/var/log/lpd-errs:

/usr/local/libexec/ifhp(comments removed for brevity)
#!/bin/sh
PATH=/bin:/usr/bin
export PATH
#  Send a reset, then Treat LF as CR+LF:
printf "\033E\033&k2G" || exit 2
#  Read first line of the file to determine type of input
read first_line

case "${first_line}" in
\%\!*)
    #
    # PostScript input, so use ghostscript and hpijs
    #
    /usr/local/bin/gs -q -dNOPAUSE -dSAFER -r600x600 \
    -sDEVICE=ijs -sIjsServer=/usr/local/bin/hpijs -dIjsUseOutputFD \
    -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="DESKJET 5550" \
    -sIjsParams="Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2" 
\
    -sOutputFile=- - && exit 0
    ;;
*)
    #
    # Plain text or HP/PCL, so just print it directly.
    # Print a form feed at the end to eject the last page.
    #
    echo $first_line && cat && printf "\033&l0H\033E" && exit 0
    ;;
esac

# Should not be reached
exit 2

/usr/local/etc/smb.conf(abbreviated)
[global]
   load printers = no
   printcap name = /etc/printcap
   printing = bsd
show add printer wizard = yes
printer admin = @ntadmin, root
use client driver = no

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes
default devmode = yes

[deskjet-r]
comment = HP Deskjet 5550 Network Printer
path = /var/spool/samba
browsable = yes
printable = yes
writable = no
guest ok = no
default devmode = yes

[print$]
comment = printer driver download area
path = /usr/local/etc/samba/drivers
browsable = yes
guest ok = no
read only = yes
write list = @ntadmin, root




More information about the freebsd-questions mailing list