Quote:> Hi, there
> Forgive me if this is a obviously question, but I can not get help from
any
> documents I found.
> I try to print to a Windows NT 4.0 with TCP/IP printing service(LPD on
> Windows NT) installed,
> and setup the /etc/printcap as needed. After I print a file, the file was
> queued in FreeBSD without send to Windows NT, the lpq command shows the
> print queue on NT is empty and a message indicates the lpd is waiting
queue
> on Windows NT to be enabled.
> Is any one ever print to a Windows NT or can show me where I can found a
> document on this?
> Thanks a lot.
Printing from FreeBSD/Unix to NT is raught with gotchas - the LPD support
in NT is an afterthought.
However, with patience it can be made to work. Here's a list of things you
need to pay attention to
on this config:
1) Microsoft TCP/IP Network Printing Support must be installed. Under NT
3.51, this is part of TCP/IP Protocol and Related Components, under NT 4
it's a Service in Network Settings.
2) The printer name created on the NT server is the print queue name. So,
you cannot use any
goofy or illegal characters for the printer name under NT. (such as spaces)
I think also there is a length limitation (there is for WfW/DOS clients)
in LPD. Stick with a long description for the printer, and a 8-character
printer name for the share & printer queue/icon name with no spaces, no
dots, no capital letters, no other baloney.
3) Unixes in general make an assumption that anything printed via "lpr" has
a type code of "text"
associated with it. With NT, if it's LPD spool recieves a print job with a
type code of RAW, then it will leave it alone and pass it through to the
printer. However, if it receives a job with a type code of TEXT it will
run it through the NT printer driver and format it as a text job for the
printer, which of course means stripping out all control codes. This
INCLUDES PostScript!!
To get around this you can do ONE of the following:
a) Read Microsoft Knowledge Base article #Q150930 and Q168457 and follow
the instructions
b) Don't use LPR to print files you don't want NT treating as text.
Remember lpr assigns the text
type code to all printed files. This includes PostScript files, which
should NOT be assigned the text type code if sent through NT!!! (While
they ARE written as text files they are not PRINTED as text files.
Postscript files are in actuality INTERPRETED when received by the
printer.) The reason that it works when the PostScript printer is locally
attached to a Unix box is because even though lpr types the job as text
(which is wrong) people usually don't have a defined "if" filter for a
local printer.
What really needs to happen is that some programmer needs to go into lpr
and rewrite it to add an option like "-b" meaning "binary files" which
would assign the "l" type code to it (meaning "print unfiltered")
4) There is no equivalent to "hosts.lpd" under NT. The printer needs to be
accessible by Everyone.
5) The NT server needs to be named in the DNS.
6) The FreeBSD printcap needs to define "rp" equal to the printer name on
NT, and "rm" equal to the DNS name of the NT server.
Ted