Home > Samples > Update > July 2005
  Longhorn to Bring New Printing Path     
   

[bio]

The following is the full text of an article published by Directions on Microsoft, an independent research firm focused exclusively on Microsoft strategy & technology. Each month we make one or more key articles available to non-subscribers.

The next version of Windows, code-named Longhorn, will include a new set of printing APIs, formats, and drivers designed to remove the limitations imposed by Windows' current printing architecture. The changes promise better printing performance as well as output quality. Although the new system will maintain backward compatibility with existing applications and devices, to obtain the best results, users will need applications written to use new APIs and new printers capable of understanding the new formats.

Benefits of a New Print Path

Getting graphics and text from a Windows application to the printed page requires several components: a set of APIs used by the application to generate the output, a spooling system to hold that output until the printer is ready (thereby enabling the system to print in the background), and a printer driver that translates the generic format used by the spooler to the specific set of graphics commands used by the printer. (These commands are often referred to as a page description language, or PDL.) Collectively, these components are referred to as a print path.

By introducing a new print path in Longhorn, Microsoft hopes to eliminate some of the limitations imposed by the current combination of Win32 APIs, Enhanced Metafile (EMF) spool file, and Graphical Device Interface (GDI) drivers.

The new print path is code-named Metro and is composed of three elements:

  • New APIs that allow applications to better specify their desired output
  • A new spool format that eliminates restrictions associated with the current format
  • New printers and drivers that use Metro directly.

WinFX Offers Improved APIs

New printing APIs will be part of WinFX, the proposed API set for Longhorn, and will allow applications to better describe how their output should appear. For example, the current GDI APIs have no support for color gradients—smooth transitions from one color to another. A Win32 application that's used to print a box whose color changes smoothly from blue to yellow must generate a bitmap of the desired result. A WinFX application, on the other hand, will need to specify only the start and end colors. This reduces the amount of data that must be kept in the spool file and sent to the printer, and it allows the device to determine the best way to create the desired effect.

However, applications must be written to use the .NET Framework to take advantage of WinFX. Microsoft will make some improvements to the current Win32 APIs to allow native applications (not based on the .NET Framework) to be "Metro aware" and take advantage of some of the new Metro capabilities. Details on these APIs and how they compare with WinFX are expected to be announced at Microsoft's Sept. 2005 Professional Developers Conference.

New Spool Format Capabilities

The Metro spool format offers several improvements over the current spool format. First, it supports a higher-resolution color format known as 16 bits per channel. Colors are represented in the computer in terms of the amount of red, green, and blue they contain. Each of these colors is called a "channel" and Win32's EMF spool file uses eight bits to represent each channel, which allows for a total of 16 million possible color values. Although this sounds like a lot, newer digital cameras are capable of capturing, and printers are capable of printing, 16 bits per channel of color information. Because the current printing system doesn't support 16 bits per channel, color information at this level of detail must be downconverted, often resulting in a pixilated appearance, particularly in images that contain smooth gradations in color, such as clouds and sky.

Second, the new format allows color profiles to be embedded in the spool file. Color profiles facilitate the translation of color information from one device to another by relating a given device's color characteristics to an industry standard. Print and graphics professionals use color profiles to correct for differences in how colors appear on various combinations of displays, printers, papers, and inks. Embedding a profile in the spool file allows the printer driver and printer to better reproduce the intended color.

Finally, the new spool format eliminates the 2GB size restriction imposed by the current EMF file format. Although consumers are unlikely to run into this limit, professional printing companies, which use very high-resolution printers and large paper formats, sometimes must break large print jobs into smaller pieces.

Metro Devices

Microsoft hopes to convince printer manufacturers to build devices that natively understand the Metro PDL. Using a consistent format from the spool file through to the final device eliminates converting data from one format to another and makes printer drivers easier to write. It also allows the contents of a spool file to be saved and viewed later using a Microsoft-provided Metro viewer.

However, the Metro print path will be available for Windows XP, Windows Server 2003, and Longhorn only, so vendors looking to support platforms such as Windows 2000, Linux, or the Mac OS would need to write their own Metro drivers for those platforms or build devices that also support an alternate PDL, such as Adobe Postscript.

Application and Driver Compatibility

The complete benefits of the new print path will be available only to new applications printing to new printers. However, Microsoft will provide converters that translate between Metro and GDI APIs, allowing existing Win32 applications to print to new Metro-based printers and new applications to print to existing printers. (For an illustration of how these converters interact with the current and future print paths, see "Metro Printing and Compatibility".)

In terms of print quality and performance, Microsoft expects WinFX applications printing to Metro-based printers to offer better print quality as well as higher performance, due primarily to the improved capabilities of the APIs and spool file and the elimination of any data conversion. Because the existing print path is essentially unchanged, Win32 applications printing to existing printers should see no difference.

The two conversions options, however, are expected to differ in print quality and performance. Both converters are expected to give better print quality and be faster than today's pure Win32 path, but the GDI-to-Metro converter is expected to outperform Metro-to-GDI on print speed, while on quality measurements, the reverse is likely to be true. More details on relative speed and quality are not yet available.

Resources

Microsoft's FAQ for the Metro print path can be found at www.microsoft.com/whdc/device/print/metro_FAQ.mspx.