smbprint (or: print to nt with smbclient)

Angie.Cabrera at LogixCom.com Angie.Cabrera at LogixCom.com
Wed May 9 20:46:35 GMT 2001


You are absolutely right that worked!!!  My printer is an HP Laserjet 8000
and it accepts both plain text and postscript files.  Is there a way with
samba or the printer to specify a plain text file, because it seems to
thinks it's a postscript and I don't know if samba or the printer is doing
that?

Let's say I use plain old unix and type lp /tmp/test.  The text file prints
just fine to same printer.  So it makes me think it's something samba is
doing??

-----Original Message-----
From: Herb Lewis [mailto:herb at chomps.engr.sgi.com]
Sent: Wednesday, May 09, 2001 2:06 PM
To: Cabrera, Angie
Subject: Re: smbprint (or: print to nt with smbclient)


Angie.Cabrera at LogixCom.com wrote:
> 
> I tried this:
> 
> [acabrera at cds acabrera]$ cat /tmp/test | smbclient
\\\\r1hou1f2\\hou1_11_cs2
> -U acabrera%password -c 'print -'
> added interface ip=172.31.44.5 bcast=172.31.44.255 nmask=255.255.255.0
> Domain=[LOGIX] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]
> putting file - as stdin-1340 (0.3 kb/s) (average 0.3 kb/s)
> 
> And got this from the printer:
> 
> Psotscript Error Handler
> 
> Offending Command = This
> Error = nametype : undefined
> Stack =
> 
> The contects of /tmp/test is "This is a test file"
> 
> So even though it looks like it is taking the file it is still trying to
use
> the contents as commands instead of printing them.
> 

You now have a different error. The file is making it to the printer
now and the printer objects because it is not a postscript file. Just
to be sure change your test file to contain the following small 
postscript page. If this prints correctly your printer only accepts
postscript input so you will have to preprocess text files with
a standard print filter.

%!
36 36 scale
/Helvetica findfont setfont
2 20 moveto
(Congratulations!) show
showpage

-- 
======================================================================
Herb Lewis                               Silicon Graphics 
Networking Engineer                      1600 Amphitheatre Pkwy MS-510
Strategic Software Organization          Mountain View, CA  94043-1351
herb at sgi.com                             Tel: 650-933-2177
http://www.sgi.com                       Fax: 650-932-2177          
======================================================================




More information about the samba mailing list