HI all, Question: 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? thanks! -aaz
Can you tell us a little bit more about how the JetDirect box is configured? Is it using TCP/IP and behaving like a lpd subsystem, or it is using HDLC? Eloy.- AAZ <187@leopard.com> wrote:> HI all, > Question: > 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? > > thanks! > -aaz >-- Eloy A. Paris Information Technology Department Rockwell Automation Venezuela Telephone: +58-2-9432311 Fax: +58-2-9431645
On Thu, 16 Jul 1998 187@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> -aazBrett ______________________________________________________________________ ( 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 ) (________________________________(____________________________________(
Brett Worth <brett@select.com.au> said:> 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).This is a script I use as an input filter for LPRng. It demonstrates the concept :) It's worked well for me with crusty old LaserJet II's and III's. Cheerio. - edan #!/bin/sh # # This is a simple filter for printing text to an HP printer attached # to a Windows 95/NT server. Written for Solaris 2; use echo -n instead # of printf for SunOS 4 and other BSDish systems. # # edan@mtu.edu 6-March-97 SERVER=$1 PRINTER=$2 SMBCLIENT=/usr/arch/samba/bin/smbclient CRLFSTR="\033&k2G" FFEED="\014" WRAPON="\033&s0C" # turn on line wrapping SHARE='\\'${SERVER} SHARE=${SHARE}'\'$PRINTER (printf $CRLFSTR; cat - ; printf $FFEED ) | # tee /tmp/$0.$$ | $SMBCLIENT ${SHARE} -P -N -c "print -"