Clients are those applications which request the spooler's services. These include applications running on the local computer; workstations on the network that send jobs to a Windows NT print server; and the Print Manager application.
Figure 6.2 The Client Component
Local print clients are any applications running on the local computer that send a print job while running on a Windows NT-based computer. These include both 16-bit and 32-bit Windows-based applications, and non-Windows-based applications.
Windows-based applications are different from nearly all other printing clients, because they depend on the Graphics Device Interface (GDI) and the Windows NT printer driver. These applications rely on Windows NT to create their print jobs, whereas other printing clients rely on Windows NT only to transfer their jobs to the appropriate print device.
The graphics engine (GDI32.DLL) is the printing component that provides WYSIWYG support across devices. The graphics engine communicates with Windows-based applications through the Graphics Device Interface (GDI) and with printer drivers through the Device Driver Interface (DDI).
When a Windows-based application prints, it describes the output it wants in a series of GDI commands. The graphics engine is responsible for translating these GDI commands into the DDI commands understood by components like printer drivers and print processors.
The graphics engine also communicates with the printer driver to find out what the printer's capabilities are. Then the graphics engine instructs the printer driver about which characters, fonts, locations, and point sizes to print and when.
The graphics engine can also query the printer driver about the fonts supported. Then, using that information, the graphics engine uses other DDI commands to specify the positioning of each character in the document by the print device. The graphics engine also uses DDI commands to define how the printer should draw and fill graphics, and how to manipulate and print bitmaps.
The graphics engine provides services to the printer driver, including compatibility with the environment subsystem (MS-DOS, OS/2, and so on), performance optimization, caching, client-server communications, and ANSI-to-Unicode conversion.
The graphics engine communicates with the spooler to determine which data type the graphics engine should spool. If the specified data type is RAW, the graphics engine calls the printer driver to render the DDI calls. If the data type is journal, the graphics engine writes a journal file and does not call the printer driver to render the DDI calls.
When the graphics engine passes the journal file to the spooler, spooling happens quickly because journal files are small and there is no wait for printer-specific rendering. (Rendering is done later as a background process.) Although journal files contain DDI calls rather than printer commands, they are device-dependent.
The graphics engine calls the printer driver and provides information about the type of printer needed and the data type used. In response, the printer driver provides the graphics engine with the printer's fully qualified path name for the printer and printer-setting information. This information is passed to the spooler.
Journal files differ from metafiles. Windows NT does not spool metafiles because they are device-independent and thus do not translate reliably to an individual printer's page layout. Metafiles are pictures, not pages. In addition, metafiles often contain a list of "acceptable" font and color substitutions for a document. For WYSIWYG accuracy, such color and font substitutions are unacceptable. In contrast, use of journal files guarantees that Windows NT provides true reproduction of spooled document.
Journal files are concise and precise. They only contain calls that make a difference. For example, some applications add hundreds of unnecessary and/or redundant instructions for creating a graphic. The journal file includes only those necessary to draw that picture.
Journal files are tuned for a particular device; they are not device-independent. For example, a journal file created for a 150-DPI LaserJet® printer cannot print on a 300-DPI LaserJet printer. A journal file is created to play back on a specific device and therefore is tuned for the device's specific coordinate space, color space, bits-per-pixel, fonts, and so on.
Non-Windows-based applications running on Windows NT-based computers are not aware of the Windows NT printing model; in particular, they are not aware of Windows NT printer drivers, they cannot make use of them, and the Windows NT driver does not get involved during the job's processing.
If you print from a non-Windows-based application, and the port it prints to is spooled, then the spooler components will take control of the job, much like other client's jobs. However, if the job is sent to a port that isn't spooled, the job goes directly to the device driver responsible for the port, for example, PARALLEL.SYS. A port is spooled if any printer defined in Print Manager prints to that port, or if you have issued a NET USE <portname> command in a Windows NT command prompt.
The second type of print client is remote workstations that send print jobs over the network to a Windows NT print server. The most interesting of these are clients running operating systems other than Windows NT. This section concentrates on those clients: downlevel Microsoft Network clients, Macintosh clients, and UNIX clients. For information on what happens when a Windows NT client sends a print job to a printer controlled by another Windows NT-based computer, see "Remote Print Providers," later in this chapter.
The spooler on the Windows NT print server does not care what kind of application the remote client is running. In most cases, the Windows NT printer driver does not get involved in processing print jobs from remote non-Windows-NT clients. The two exceptions are when jobs sent from Macintosh clients to non-PostScript print devices and when jobs from UNIX or downlevel clients are sent to printers whose default data type has been set to TEXT.
Computers on the network running Windows for Workgroups, Windows 3.1, or MS-DOS are referred to as downlevel clients. Any downlevel client that can send a job to a Windows for Workgroups print server or LAN Manager print server can also send jobs to a Windows NT print server.
The Windows NT Server service receives jobs from these clients and passes them to the spooler without alteration. Regardless of what kind of application created the print job on the downlevel client, the job is assigned the RAW data type when it reaches the spooler. In general, the printer driver installed on the Windows NT print server does not get involved with processing jobs from downlevel clients.
Because Windows NT Services for Macintosh is required for Macintosh clients to send print jobs to printers controlled by Windows NT-based computers, Macintosh clients cannot print to printers controlled by Windows NT Workstation computers. Windows NT Server, running Services for Macintosh, is required to make printers available to Macintosh clients.
Macintosh clients usually print using a PostScript driver, so their print jobs consist of PostScript commands. Jobs sent to PostScript print devices are assigned the RAW data type, and the Windows NT printer driver does not help process the print job. Macintosh print jobs sent to non-PostScript print devices are assigned the Pscript1 data type, which causes Windows NT Server to convert the job from PostScript to the print device's native language. In this case, the Windows NT printer driver is involved in processing the job.
Windows NT can also receive print jobs sent by UNIX systems. To enable this feature, you must first install the TCP/IP network protocol via the Network icon in the Control Panel window, and then install the TCP/IP Network Printing Support option. This procedure installs the LPD service ("daemon" in UNIX terminology), which enables Windows NT to receive print jobs sent by UNIX computers. Once installed, you must start this service by using the Services icon in the Control Panel window or by typing the net start lpdsvc command at the command line. Jobs that reach the LPD service are assigned the RAW data type if they contain the "l" control command, or are assigned the TEXT data type if they contain the "f" control command. For more information on these control commands, see "LPR Print Monitor," later in this chapter.
For more information about UNIX print connectivity, see "Print Monitors" later in this chapter.
Because Print manager relies on the spooler components, it is also considered a client. Print Manager is a window into the spooler components; a user interface that lets you configure various options and manipulate print jobs as they are processed.