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

User Interface Behavior

· 52CE 我爱测

Review a discussion about user interface behavior with respect to features and options for documents and printing.

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

Assume that you are creating a PrintCapabilities client that reads in a PrintCapabilities document and selects one or more Options from each Feature and uses those to construct a PrintTicket that specifies the configuration that is to be used to process the Job. For each Feature of interest, the client must examine each Option, and decide whether that Option is appropriate for the task at hand. For an Option that is not parameterized, it can be evaluated by accessing the Value of each ScoredProperty. In the case of a nonparameterized media size Option, the client determines whether the width and height dimensions of the media reported in each Option match the dimensions required.

In the case of the parameterized Option, the client must access the ParameterDef instance that is indicated in the ParameterRef instance contained in one of the ScoredProperty instances. The ParameterDef typically defines the range of values allowed for the parameter, as well as the units (inches, mm, and so on) represented by the value. If the required dimensions fall within the range of values permitted for each of the parameters, the client has the additional task of initializing the parameters (by means of a ParameterInit instance) in the PrintTicket. This is a particularly important task. For example, a PrintTicket should not specify a custom media size without specifying the dimensions of the media, because the resulting PrintTicket will be ambiguous and ill-defined.

A similar set of circumstances must be handled if the client is a user interface. The user interface typically displays the values of the ScoredProperty instances defined for each Option. For clarity, it is essential to display the allowed range and units for the parameters in a parameterized Option. In addition, if the user selects the parameterized Option, the user interface (UI) must prompt the user to enter the value to be used to initialize each parameter. Finally, the UI must compose a PrintTicket that reflects all of the user's selections.

For the details of PrintTicket construction and specification of parameter initialization, see Creating a Device-Specific PrintTicket. For information about dereferencing ParameterRef instances and interpreting ParameterDef instances, see Using Parameters.

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)

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

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