大网数据广告活动
打印与设备

Printing (Documents and Printing)

· 52CE 我爱测

Windows provides applications with a complete set of functions that allow printing to various devices, such as laser printers, vector plotters, raster printers, and fax machines.

Windows provides applications with a complete set of functions that allow printing to various devices, such as laser printers, vector plotters, raster printers, and fax machines.

Desktop App Printing

Windows programmers can select from several different technologies to print from their application.

Technology Description
<a href="/windows/desktop/printdocs/tailored-app-printing-api">Print Document Package API</a> Provides an interface that allows an application to access and manage the print document package. This API is available with Windows 8 and later versions of Windows.
<a href="print-spooler-api.md">Print Spooler API</a> Provides an interface to the print spooler so that applications can manage printers and print jobs. Applications use the <a href="print-spooler-api.md">Print Spooler API</a> to start, stop, control, and configure print jobs managed by the print spooler whether they use the <a href="/windows/desktop/printdocs/tailored-app-printing-api">Print Document Package API</a> or the <a href="gdi-printing.md">GDI Print API</a> to print the content.
<a href="print-ticket-api.md">Print Ticket API</a> 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 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

The Print Document Package APIs in this section describe the print document package and print preview interfaces that you can use with Windows 8 and later versions of Windows desktop.

For more info about printing from Windows Store apps that are written in JavaScript and HTML, see Printing (Windows Store apps using JavaScript and HTML). For more info about printing from Windows Store apps that are written in C#, Microsoft Visual Basic, or C++ and XAML, see Printing (Windows Store apps using C).

Note:
See Win32 and COM for Windows Store apps (printing and documents) for the list of the Desktop App Printing APIs that can also be used in Windows Store apps.

Related topics

XPS Document API

Bidirectional printer communications (Hardware Dev Center)

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。