About Printing

Windows programmers can select from several different technologies to print from their application. Managed-code applications can use the System.Printing namespace to print and the following print APIs support printing from native Windows applications.

TechnologyDescription

XPS Print API

Provides an interface to the print spooler that applications can use to send XPS documents to a printer.

Native Windows applications that create XPS documents, such as by using the XPS Document API, can use the XPS Print API to send the XPS documents to a printer. Using the XPS Print API, applications can print to printers that use GDI printer drivers or XPSDrv printer drivers.

Print Spooler API

Provides an interface to the print spooler so that applications can manage printers and print jobs.

Applications use the Print Spooler API to start, stop, control, and configure print jobs managed by the print spooler whether they use the XPS Print API or the GDI Print API to print the content.

Print Ticket API

Provides applications with functions to manage and convert print tickets.

GDI Print API

Provides applications with a device-independent printing interface.

Note  Developers who are writing applications for Windows Vista and later versions of Windows should consider using the XPS Document API and the XPS Print API in their application.

The GDI Print API is suitable for applications that must run on Windows XP and earlier versions of Windows.

 

The following illustration provides a high-level view of how the different printing APIs are related.

A diagram that shows how a native Windows application can use the print APIs.

This section also contains information about the bidi printer communication interface that enables low-level, bidirectional communication between an application and a printer. The bidi printer communication interface is designed for a specialized type of printer communication and is not used for normal printing.

 

 

Community Additions

Show:
© 2015 Microsoft