In the following overview of remote printing, Windows NT 4.0 Server is considered to be the print server. Some processes, or the software components that perform them, are slightly different for non-Windows NT print clients. For more details about different print clients, see "Print Clients" later in this chapter.
Figure 2.1 Windows NT Remote Printing Process
1. A user at a client computer chooses to print a document.
If the client is running any Windows operating system and is printing from a Windows application, the application calls the graphics device interface (GDI). GDI calls the printer driver associated with the target print device. Using the document information from the application and the print device information from the printer driver, GDI renders the print job in the printer language of the print device. The application then calls the client side of the spooler (Winspool.drv).
If the client is running a non-Windows operating system or is using a non-Windows application on a Windows operating system, another software component that functions similarly to GDI performs the same task.
2. The client computer delivers the print job to the print server.
If the client is running Windows NT, the client side of the spooler (Winspool.drv) makes a remote procedure call (RPC) to the server side of the spooler (Spoolss.exe), which makes a direct application programming interface (API) call to the router (Spoolss.dll). The router polls the remote print providers, and the Windows remote print provider (Win32spl.dll) makes an RPC to Spoolss.exe on the print server, which receives the print job over the network.
If the client is running another Windows operating system or is a Windows NT client who created a local printer port and redirected output to a network server (\\server\printer), the print job goes to the client computer's NetBIOS redirector. The redirector uses the protocol driver to send the job over the network to the print server's protocol, which delivers the job to the Windows NT Server service on the print server.
If the client is a UNIX computer or any computer running LPR software, the print job goes to the TCP/IP protocol, which sends it over the network to the print server's LPD service.
If the client is a Macintosh computer, the print job goes to AppleTalk, which sends it over the network to Services For Macintosh (SFMMON) on the print server.
3. The router or print server service receives the print job.
On the print server, print jobs from Windows NT clients using Windows applications are enhanced metafiles (EMF). Some print server services for non-Windows NT clients assign a data type and others leave the data type blank. Print jobs with no data type assume the default data type in the Print Processor dialog box on the print server. For more information, see "Data Types" later in this chapter.
4. The router or print server service passes the print job to the local print provider on the server (a component of the spooler), which spools the print job (writes it to disk).
5. The local print provider polls the print processors. When a print processor recognizes the job's data type, that print processor receives the print job and alters it (or not) according to its data type to ensure that the job prints correctly.
6. Control of the print job passes to the separator page processor, which adds a separator page, if specified, to the front of the job.
7. The job is despooled to the print monitor.
If the print device is bi-directional, the job first goes to a language monitor, which handles bi-directional communication with the printer and then passes the job to the port monitor.
If the print device is not bi-directional, the job goes directly to the port monitor, which transmits the print job to the print device or to another server over a specific communications channel.
8. The print device receives the print job, translates each page into a bitmap, and prints it onto paper or another medium.