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

PrintTicket Schema and Document Construction

· 52CE 我爱测

Learn about the PrintTicket format, which expresses configuration information using the XML-based Print Schema Framework.

This topic is not current. For the most current information, see the Print Schema Specification.

The current method of specifying device configuration information using a DEVMODE structure suffers from several limitations. First, the DEVMODE structure is a binary structure, which can lead to problems of differing versions. Second, it is divided into a nonextensible public portion and a private portion that can be accessed only by drivers, and only then by the specific driver that created it. The PrintTicket format expresses configuration information using the XML-based Print Schema Framework, thereby eliminating these shortcomings of the DEVMODE structure.

The PrintTicket Schema addresses each of the two problems just mentioned. First, the PrintTicket Schema is an XML-based text file, so problems with extensibility and versioning are eliminated. Second, configuration information is available to all clients, meaning that any client or provider can store and retrieve any information contained in a PrintTicket. Options are described using the same technique used by the Print Schema Framework and the derived PrintCapabilities document. For this reason, the PrintTicket provides all of the potential portability benefits of the Option definition model to be realized. See Print Schema Framework for more information. The intended audience for this section includes the following groups:

  • Implementers of a PrintTicket / PrintCapabilities Provider interface

  • Consumers of the PrintTicket

  • Clients of a PrintTicket / PrintCapabilities Provider interface

Members of the first category in the preceding list are referred to as PrintTicket providers in the remainder of this section. Members of the last two categories are referred to as PrintTicket consumers.

Relationship to Print Schema and PrintCapabilities Schema

The PrintTicket and PrintCapabilities schemas are both specialized parts of the Print Schema. The main structural differences between these subsets of the Print Schema is that the PrintTicket Schema contains Property and ParameterInit instances that are not contained in the PrintCapabilities Schema, while the PrintCapabilities Schema includes Property and ParameterDef instances that are not contained in the PrintTicket Schema. Except for these differences, the PrintCapabilities and PrintTicket schemas generally mirror each other in content, sharing Feature, Option, ScoredProperty, and Value instances. Any such shared content must be kept up-to-date. For example, if a change is made in the MediaSize Feature in the PrintCapabilities Schema, the same change must be made in the PrintTicket Schema.

Related topics

Print Schema Specification

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)

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

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