smbprinting --> HP

Brett Worth brett at select.com.au
Thu Jul 16 06:40:40 GMT 1998


On Thu, 16 Jul 1998 187 at leopard.com wrote:
 
> I have a freeBSD box using smbprint to print on a HP jet direct printer
> attatched to a NT server.
> However the formatting is horrible and it only prints out about the first 2
> lines of a file. Any suggesstions out there?

Sounds like your end of line is not being handled correctly.

There are two things you can do:

1. Translate the eol at the Unix queue. e.g. cat $FILE | unix2dos | smbclient
2. Make the HP handle the eol it's self

Number 2 is the best option.  If you have a choice it's better to not tamper
with the data in the queue.  In that way you dont lose the ability to send
binary PCL to the same queue (unix2dos would corrupt binary data).

The HP has an escape sequence you can send which causes it to interpret a
line feed on it's own (without any ajacent control chars) as a line feed
and carriage return WHEN IN TEXT MODE.  I dont have an HP Manual so 
I cant look it up. I do know it has a "K" in it. :-)

Then you could do: (echo -n "^[??K???"; cat $FILE) | smbclient -P

> -aaz

Brett

 ______________________________________________________________________
(  S E L E C T   A P P R O A C H ( Brett Worth - Midrange Systems     (
 ) 25 Darling St,  Mitchell 2911  )Ph: +61 2 6241 5633 Fx: 6241 3733   )
(________________________________(____________________________________(



More information about the samba mailing list