Understanding the Windows Printing Subsystem
The print subsystem on versions of Windows earlier than Windows Vista used the GDI print path. The GDI print path processes print jobs as follows:
- Client processes When a user on a client computer sends a print job from an application, the application calls the GDI, which then calls the printer driver for information about how to render the print job in a format that the printer can understand. The printer driver resides on the user's computer and is specific to the type of printer being used. After the GDI renders the print job, it sends the job to the spooler. By default on Windows 2000 and later versions, the GDI renders print jobs using the Enhanced Metafile (EMF) format, a standard print job format that is highly portable but needs to be further rendered by the spooler before being sent to the printer. When an EMF print job is sent to the spooler, control returns to the user and the spooler then completes rendering the job for printing. (Because the EMF job is quickly handed off to the spooler, the time during which the user's computer is busy is minimized.)
- Spooler processes The print spooler is a collection of features that resides on both the client computer that sends the print job and a network print server that receives the job for printing. The spooler takes the job as rendered by the GDI and, if necessary, renders it further to ensure that it prints correctly. The spooler then hands the job off to the printer.
- Printer processes The printer receives the print job from the spooler, translates it into a bitmap, and prints the document.
Beginning with Windows Vista, the printing subsystem still includes a GDI print path (for Type 3 - User Mode) to support printing to existing printers. Kernel-mode GDI (Type 2 - Kernel Mode) drivers, however, are no longer supported.
Note Type 3 (User Mode) means that the driver is compatible with Windows 2000, Windows XP, Windows Server 2003, Windows Server 2003 R2, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2.
Beginning with Windows Vista, the printing subsystem also includes a second print path that is based on XPS. This additional print path, called the XPS print path, is built on the XPS printer driver model (XPSDrv) and provides the following benefits over the GDI model:
- Maintains the XPS document format from the point when an application sends a print job to the final processing by the print driver or device. By comparison, the GDI print path first renders the job into EMF, and then the print driver or device renders the job a second time into the language the printer can understand.
- The XPS print path can be more efficient and can provide support for advanced color profiles, which include 32 bits per channel (bpc), CMYK, named colors, n-inks, and native support of transparency and gradients when XPS-capable printers are being used.
- Provides "what you see is what you get" (WYSIWYG) printing.
Applications can print documents in Windows Vista and later versions by using either the GDI or XPS print path. For example, if a Win32 application sends the print job to a print queue that uses a GDI-based print driver, the print job is processed using the same GDI print path used in previous versions of Windows. However, if a WPF application sends the job to a print queue that uses a new XPSDrv print driver, the job is spooled using the XPS Spool File format and is processed using the XPS print path. The print path taken by the print job is therefore determined by the type of printer driver (GDI-based or XPSDrv) installed on the target print queue.
Figure below illustrates the two print paths (GDI and XPS) available in Windows Vista and later versions. Although not shown in the diagram, both of these paths use the same Print Spooler service (%SystemRoot%\System32\spoolsv.exe).
Depending on the presentation system of the application from which the document is being printed, the print job might need to be converted before being spooled in the target print path. For example, when you print from a Win32 application to an XPS-capable printer, GDI spooling functions must perform GDI-to-XPS conversion, which simulates a WPF application and spools the job in XPS Spool File format. Similarly, when you print from a WPF application to a legacy GDI-based printer, the WPF Print Support functions must perform XPS-to- GDI conversion, which simulates GDI calls by a Win32 application and spools the job in EMF format. These two conversion technologies are built into Windows Vista and later versions for maximum application compatibility when printing from different kinds of applications to either legacy or XPS-capable printers.
For more information on the XPS print path and XPSDrv print drivers, see the white paper titled "The XPSDrv Filter Pipeline" on WHDC at http://www.microsoft.com/whdc/device/print/XPSDrv_FilterPipe.mspx.
The XPS print path, introduced in Windows Vista and Windows Server 2008, did not provide any rendering services and therefore placed a higher burden on vendors developing drivers with support for the XPS print path. Rendering services provide the ability within the printing subsystem to convert a print job into a format that can be sent to the printer. In the GDI print path, the operating system provides rendering services that support conversion to raster, printer control language (PCL), PostScript, and HP-GL for output.
A rasterization service enables printer drivers to render a print job and send it to the printer in PDL format. In Windows 7 and Windows Server 2008 R2, the XPS Rasterization service (XPSRas) provides print driver developers with the capability to rasterize XPS content in the Windows print path. This service enables printer driver developers to provide better support for printers and other document peripherals on the Windows platform and provides an XPS service that is better than the rasterization capability provided in previous versions of Windows.
In this tutorial:
- Managing Printing
- Enhancements to Printing in Windows 7
- Printing Enhancements Previously Introduced in Windows Vista
- Additional Printing Enhancements in Windows 7
- How Printing Works in Windows 7
- Understanding XPS
- Understanding the Windows Printing Subsystem
- Understanding Printer Driver Isolation
- Understanding the Print Management Console
- Enhancements to the Print Management Console in Windows 7
- The Print Management Console
- Adding and Removing Print Servers
- Configuring Default Security for Print Servers
- Adding Printers Using the Network Printer Installation Wizard
- Creating and Using Printer Filters
- Creating and Using Driver Filters
- Managing Printers Using Print Management
- Configuring Properties of Printers
- Publishing Printers in AD DS
- Managing Printer Drivers
- Configuring Printer Driver Isolation Mode
- Configuring Printer Driver Isolation Mode Using the Print Management Console
- Configuring Printer Driver Isolation Mode Using Group Policy
- Troubleshooting Driver Isolation
- Exporting and Importing Print Server Configurations
- Printer Export Files
- Performing Bulk Actions Using Print Management
- Client-Side Management of Printers
- Installing Printers Using the Add Printers Wizard
- Searching for Printers
- Installing Printers Using Point and Print
- Using Devices And Printers
- Using the Color Management CPL
- Managing Client-Side Printer Experience Using Group Policy
- Configuring the Add Printer Wizard
- Disable Client-Side Printer Rendering
- Configuring Package Point and Print Restrictions
- Extending Point and Print Using Windows Update
- Deploying Printers Using Group Policy
- Preparing to Deploy Printers
- Deploying a Printer Connection
- Limitations of Deploying Printers Using Group Policy
- Migrating Print Servers
- Migrate Print Servers Using Print Management
- Migrating Print Servers Using PrintBRM
- Monitoring and Troubleshooting Printers
- Configuring E-Mail Notifications
- Configuring Print Server Notifications
- Configuring Script Actions
- Configuring Detailed Event Logging