FreeBSD6 or samba, printing blank end page

Dave dmehler26 at
Sat Apr 8 19:51:52 UTC 2006

    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.

/etc/printcap(only one printer displayed for brevity)
deskjet|lp|hp|Hulett Packard Deskjet 5550 printer:\

deskjet-r|lp1|hp-raw|Hulett Packard Deskjet 5550 printer-raw:\

/usr/local/libexec/ifhp(comments removed for brevity)
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" \
    -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

# Should not be reached
exit 2

   load printers = no
   printcap name = /etc/printcap
   printing = bsd
show add printer wizard = yes
printer admin = @ntadmin, root
use client driver = no

   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

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

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