smbprint(ing) to a HP 3100??

Jeff Wiegley jeff at
Fri Apr 9 18:36:34 GMT 1999

Matt Chapman wrote:
> Jeff Wiegley wrote:
> > I can connect to the share that represents this printer:
> >
> > smbclient \\\\server\\printer "" -N
> >
> > and I get the SMB> prompt which (I think) is pretty useless for
> > printers.
> Not useless at all - try for instance "print <file>". "help" will show
> all commands available.
>         Matt

This is true but it still doesn't work (at least not well).

You can use smbclient --> print <file> to correctly print a file
to the printer only if that file was generated by the HP 3100 device
driver on a windows machine.

For instance.
1) on the machine the printer is connected to:
  a) open netscape
  b) print the netscape display to a file using the hp3100 default
  c) transfer the file (say "test.prn") to the linux box via FTP
2) on the linux box:
  a) smbclient \\\\server\\share ""
  b) smb: \> print test.prn

you will get a nice print out on the HP 3100 connected to the
windows 95 machine "server".

However do this:

On a linux box:
1) open up netscape
2) print the netscape window to a file ""
3) use ghostscrip to change it to an HP command language...
   gs -dNOPAUSE -sDEVICE=ljet2p -sOutputFile=bug.prn -c quit
4) now use smbclient to print bug.prn...
  a) smbclient \\\\server\\share ""
  b) smb: \> print bug.prn

after a couple of seconds the windows98 box will crash with
a blue screen of semi-death (your choices are to continue in
which case things might not work correctly or you cn hit ctrl-alt-del
to reboot the machine.

A quick look at the heads of test.prn and bug.prn reveal two very
different formats.  Anybody have an idea on what to add to the
beginning of a file to get the hp3100 to recognize it or some
other way to get ghostscript to generate the proper format?


Jeff Wiegley

More information about the samba mailing list