FreeBSD6 or samba, printing blank end page

Bill Campbell freebsd at celestial.com
Sat Apr 8 20:01:35 UTC 2006


On Sat, Apr 08, 2006, Dave wrote:
>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.

Typically this is caused by printer output that's padded with
blank lines to fill the page size which causes an automatic page
feed from the printer.  The printer interface then sends a form
feed character to eject the last page which is blank.

My solution for this, which goes back over 20 years to Tandy
Xenix systems, it to use a printer interface script/filter that
(a) strips all trailing blank lines from the output, and (b)
sends an appropriate printer sequence to eject the last page.

The printer sequence for many dot-matrix printers is FF (octal
013, hex 0xb).  The sequence for HP laser printers is <ESC>E
which is really a reset command, but it will print a page if
there's anything it the printer's buffer.

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``It wasn't raining when Noah built the ark.''


More information about the freebsd-questions mailing list