This section briefly describes the network printing process on the client and then the server, followed by a more detailed description of the components and their activities. This section describes a fully functional network with all required software installed on the server and the clients. It also assumes that the print server is running Windows Server 2003.
The components and processes involved in printing vary depending on the client and the operating system, even within the Windows family of operating systems. Because of differences between print clients, the components used in the server process can also vary. Since the following description of the printing process is simplified, the print clients can be grouped into Windows and non-Windows platforms.
Client Computers Running a Windows Operating System
On client computers running Windows 2000 or Windows XP operating systems, the client spooler sends an enhanced metafile (EMF) through the client spooler to the spooler on the print server.
The client spooler forwards information and data from the GDI and the printer driver as an EMF to the spooler on the print server. The client spooler does this by making a remote procedure call (RPC) to the server spooler (Spoolsv.exe), which makes a direct application programming interface (API) call to the print router (Spoolss.dll). The print router polls the remote print providers, and the remote print provider (Win32spl.dll) makes an RPC to the server spooler, which receives the print job over the network.
On clients running Windows 95, Windows 98, or Windows Millennium Edition, a Windows-based application creates an EMF, which is then rendered to a page description language (PDL). Next, the print job is sent to a local printer port, where it would go if printing to a local printer, by the Server Message Block (SMB) redirector. The redirector delivers the job to the print server service running on the print server.
On clients running Windows NT 4.0, applications create output in a page-description language (PDL). Next, the PDL data is sent with an RPC over SMB to the server spooler.
Client Computers Running a Non-Windows Operating System
On client computers running a non-Windows operating system, or using an application that is designed for a non-Windows operating system, a software component performs functions similar to that of the Graphics Device Interface (GDI). Next, the device information and print data are sent to the print server. Windows Server 2003 can accept print jobs sent from a client using Line Printer Remote (LPR), AppleTalk, and NetWare when the server is running, respectively, the Line Printer Daemon (LPD) service, Print Server for Macintosh, or File and Print Services for NetWare. Typically, such clients would be running UNIX, Apple Macintosh, and NetWare, though additional software could enable them to use a protocol associated with a different system. Also, a client might send a print job by using Internet Printing Protocol (IPP).
On the print server, the service that initially receives incoming print jobs depends on the protocol used by the client to submit the print job. Print jobs sent by way of AppleTalk are received by the Service for Macintosh component, print jobs sent by way of LPR are received by the LPD service, and print jobs sent by way of SMB are received by the Server service.
However, print jobs from most client computers running Windows are received by the Spooler service by way of RPC. This includes print jobs from client computers running Windows 2000 and Windows XP, and it is print jobs from such clients that this section describes.
The Spooler service, Spoolsv.exe, is an executable file that is installed as a service. The spooler is loaded when the operating system starts, and it continues to run until the operating system is shut down. The Spooler service manages the printing process, which includes such tasks as retrieving the location of the correct printer driver, loading that driver, spooling high-level function calls into a print job, and scheduling the print job for printing. When the tasks for a particular print job are complete, the Spooler service passes the job to the router.
The spooler router, Spoolss.dll, determines which print provider to call, based on a printer name or other information provided with the print job. If the print job is for a printer served by the local server, the provider is the local print provider, Localspl.dll; if the print job is for a printer served by a remote server, the job is routed to a remote print provider.
The print provider is the software that supports the specified print device. The local print provider, Localspl.dll, actually calls the printer driver to render the print job. The print provider is also responsible for spooling the print job.
After a print job is spooled, it is the Print Monitor that directs the output to the appropriate port monitor. Port monitors provide a communications path between the print spooler and the port drivers that access the port hardware. Port monitors serve both local print devices connected directly to the server and remote print devices connected directly to the network.
In addition to the port monitor, when the target print device supports two-way communication, a language monitor provides a communication path for configuration and status information. The language monitor supports delivery of unsolicited information from the printer, for example, notice that it has run out of paper.
The following sections cover in greater detail some of the components on the client and server involved in network printing.
Remote Print Provider
When the server spooler receives a print job from the client spooler, the print router queries the remote print providers, and gives control of the print job to the first provider that recognizes the destination printer. Remote print providers can be created by other companies; Microsoft supplies the following three remote print providers:
Win32spl.dll
Win32spl.dll is the remote print provider on a Windows-based network. Win32spl.dll sends jobs to print servers running Windows NT 4.0 or Windows for Workgroups. For a print server running Windows Server 2003, Win32spl.dll makes an RPC to the spooler on the server (Spoolsv.exe), which makes a call to the print router (Spoolss.dll). The print router receives the job over the network and passes it to the local print provider as if a local client had submitted it.
Inetpp.dll
Inetpp.dll performs specific processing on Internet print servers. For an Internet print server, Inetpp.dll recognizes the printer name by its URL and submits the print job to the appropriate printer by using IPP.
Nwprovau.dll
Nwprovau.dll performs specific processing on NetWare print servers. For a NetWare print server, Nwprovau.dll recognizes the printer name when the print router on the print server running Windows Server 2003 polls it. Nwprovau.dll takes control of the print job and sends a message to the NetWare Workstation Service, which in turn passes control to the NetWare redirector. The NetWare redirector sends the print job to the NetWare print server.
Print Router
When submitting a document for printing, the application communicates with the client side of the spooler (Winspool.drv). Winspool.drv makes an RPC connection to the server side of the spooler (Spoolsv.exe), which makes a direct API call to the print router (Spoolss.dll), which is also on the server side of the spooler. The print router passes the print job to the local print provider.
Graphics Device Interface (GDI)
The GDI calls the printer driver and provides information about the type of printer needed and the data type used. The printer driver responds by sending printer data to the GDI, which the GDI passes to the spooler.
Computers running Windows 2000, Windows XP Professional, and any 32-bit version of Windows Server 2003 can run 16-bit applications through a process called Windows on Windows (WOW). WOW allows 16-bit applications to run on an x86-based computer.
WOW interacts with the applications through the GDI and with printer drivers through the device driver interface (DDI). The GDI also provides services to the printer driver, including caching, client and server communications, and conversion from American National Standards Institute (ANSI) character set to Unicode.
Note
-
The 64-bit versions of Windows XP Professional and Windows Server 2003 do not support 16-bit applications. However, WOW 64 does allow 32-bit applications to run on 64-bit versions of Windows XP Professional and Windows Server 2003.
Printer Drivers
A printer driver is a software program that understands how to communicate with printers and plotters (devices used to draw charts, diagrams, and other line-based graphics). Printer drivers translate the information that an application sends through the GDI into drawing commands that the printer understands. These drawing commands are for creating text and graphics. Various drivers must be installed on the print server to support different hardware and operating systems. For example, an administrator who uses a computer that is running Windows Server 2003 and who shares a printer with clients that are running Windows 95, Windows 98, and Windows Millennium Edition, might need to install the appropriate drivers so that clients that are running these versions of Windows are not prompted to install the missing drivers.
The printer driver sends information about the printer settings, including the specifications that are needed to produce each character of the document, to the GDI. The printer driver also transmits helper services or utilities required to make the output print correctly.
Some kernel-mode printer drivers might cause the system to stop responding. Windows Server 2003 gives you the ability to control the installation of printer drivers. By default, all editions of Windows Server 2003 block the installation of kernel-mode drivers, but you can allow their installation by disabling the Group Policy setting Disallow installation of printers using Kernel Mode drivers. This setting affects only the installation of new kernel-mode drivers. If you are upgrading your system, existing kernel-mode drivers are unaffected.
Windows Server 2003 provides the following three generic printer drivers:
-
Universal (Unidriver)
-
PostScript
-
HP-GL/2 plotter
Universal printer driver (Unidriver)
The Unidriver is also called the raster driver because it supports raster (bitmap) graphics printing and is compatible with many printers. This driver supports the following features:
-
Color printing at various depths, such as 4 bits per pixel (bpp), 8 bpp, and 24 bpp.
-
Scalable TrueType and OpenType fonts, device fonts (including double-byte), grayscale printing, font substitution, run length encoding (RLE), Tag Image File Format (TIFF) version 4.0, and Delta Row Compression (DRC).
-
An extension interface that allows printer manufacturers to customize the driver for specific models.
-
Vector graphics languages HP-GL/2 and PCL-XL, monochrome, and color. This is a change from the version of Unidriver that shipped with Windows 2000. (The added HP-GL/2 support, which is used with normal PCL5e printers, is different from the HP-GL/2 for plotters, which is used only for plotters.)
The Unidriver contains the following component files:
-
Unidrv.dll is the printer graphics driver file for printer languages based on raster images, including most inkjet and dot-matrix printer languages.
-
Unidrvui.dll is the configuration file. It displays the user interface for Unidrv.dll.
-
Unires.dll, Stdnames.gpd, Ttfsub.gpd and some other support files.
-
Raster minidriver, which has the file name extension .gpd, is the data file, and is also called the characterization file. The file name depends on the printer or printer family.
PostScript printer driver
The Windows Server 2003 PostScript driver sets up the print jobs for printers that have an onboard PostScript interpreter. This driver automatically supports key features — including binary transfer compression, resolution, and paper source — for printers reporting as PostScript levels 1, 2, and 3. Its output is fully compliant with Document Structuring Convention (DSC) 3.0, a structural specification for PostScript documents.
This driver contains the following component files:
-
Pscript5.dll is the driver file.
-
Ps5ui.dll is the configuration file. It displays the user interface for the driver file, reports device capabilities to applications, and handles DevMode settings. Ps5ui.dll also allows you to enable TrueType and OpenType font substitution and image color matching and to determine whether color matching needs to be done on the host or on the printer.
-
The data file, which has the file name extension .ppd, is also known as a characterization file. The file name preceding the .ppd extension varies and is typically determined by the printer manufacturer. PPD files are the only printer driver files that are generally binary-compatible across processors and platforms.
HP-GL/2 plotter driver
The Windows Server 2003 plotter driver supports diverse plotters that use the HP-GL/2 language; however, Windows Server 2003 does not support HP-GL. The output from an HP-GL/2 driver requires a plotting device that can process all the enhancements built into the HP-GL/2 language.
This driver contains the following component files:
-
Plotter.dll is the driver file.
-
Plotui.dll is the configuration file. It displays the user interface for Plotter.dll.
-
The driver contains a data file, which has the file name extension .pcd. The file name preceding the .pcd extension varies and is typically determined by the plotter manufacturer.
Local Print Provider
The local print provider, Localspl.dll, writes the job data to a spool (.spl) file. It also tracks administrative information, such as user name, document name, and data type, in a shadow (.shd) file. Spooling protects a print job by saving it on disk. If a power failure or other disaster occurs before all jobs in the queue are printed, the .spl and .shd files preserve the documents and prevent loss of data after processing resumes.
Note
-
If the print job is only partially saved to disk, the spooler might recognize the print job as corrupt and delete it upon restart.
Next, Localspl.dll polls the print processors for recognition of the document data type. If no data type has been set, Localspl.dll receives the job and uses the default data type.
By default, .spl and .shd files are written to the folder systemroot\System32\Spool\Printers, and they are deleted after the job prints. If the hard disk partition containing Windows Server 2003 does not have enough space for these files, you can change the location of the folder. You might also move the spool files if you want to move the spooling load to a separate disk array.
Note
-
Do not attempt to spool to the root of a disk, such as D:\. This causes the files to spool to the old default spool folder.
Print Processor
The print processor is a part of the spooler process. If the job type is EMF, the print processor works with GDI to move the spooled print jobs from the hard disk to the printer driver. If the data type is RAW, the print processor helps in moving the job directly to the printer. The print processor controls certain features of the print job, depending on the kind of job. For example, if the data type of the spooled job is EMF, the print processor can help in printing the document in reverse order or it can print it in booklet form instead of the default one-page-per-sheet form. Winprint.dll is the name of the default print processor on Windows Server 2003. Winprint.dll is part of Localspl.dll.
Software vendors can develop their own print processors for custom data types. A printer vendor can also develop a custom print processor if the vendor has its own printer driver or supports a data type other than the three that WinPrint.dll supports. Also, a vendor can write a custom print processor if the vendor wants to add functionality that Winprint.dll does not provide. Usually, the print processor is installed when the printer driver is installed.
Print Monitors
Windows Server 2003 supports two kinds of print monitors:
-
Language monitors
-
Port monitors
Port monitors are further subdivided into:
-
Local port monitors
-
Remote port monitors
Language monitor
The language monitor provides the common language that is needed for the client and printer to understand each other in bidirectional communication so that you can configure the printer and monitor printer status. You can request configuration and status from the printer, and the printer can send unsolicited status information (such as “Paper tray empty”) to the client.
Windows Server 2003 includes Pjlmon.dll, a language monitor that uses Printer Job Language (PJL). PJL is the language that implements the bidirectional communication; it does this by using a parallel port connection, such as one between a Hewlett-Packard LaserJet 5Si and the computer. Any bidirectional printer that uses PJL can use Pjlmon.dll.
If a printer uses a different printer language, the vendor can develop a language monitor for it. A vendor might also develop a language monitor to add data, such as printer-specific control information, to the print stream that is going to a unidirectional printer.
To take advantage of bidirectional printing, you need a bidirectional printer, and a correctly configured bidirectional port and port monitor. The standard port monitor supports bidirectional communication by default.
Local port monitor
The local port monitor controls parallel and serial input/output (I/O) ports where a printer might be attached. The local port monitor sends print jobs to local devices, including those on familiar ports such as LPT1, COM1, or FILE (Print to File).
A second local port monitor, Usbmon.dll, controls communication through universal serial bus (USB) ports. Usbmon.dll installs automatically whenever you plug a USB printer into the correct physical port on your computer. If USB has been enabled in the BIOS, Windows XP Professional detects the device and displays its settings on the screen.
Installation opens the USB Root Hub and a generic USB printer port (for example, USB001, USB002), and copies the printer Plug and Play driver.
Remote port monitors
All other port monitors that are supplied with Windows Server 2003 are remote monitors that enable printing to remote printers. An example is the standard TCP/IP port monitor.