PrintQueue.GetPrintCapabilitiesAsXml 方法

定义

获取一个 MemoryStream 对象,该对象将打印机的功能指定为遵从打印架构的 XML 流。Gets a MemoryStream object that specifies the printer's capabilities as an XML stream that complies with the Print Schema.

重载

GetPrintCapabilitiesAsXml()

获取一个 MemoryStream 对象,该对象将打印机的功能指定为遵从打印架构的 XML 流。Gets a MemoryStream object that specifies the printer's capabilities as an XML stream that complies with the Print Schema.

GetPrintCapabilitiesAsXml(PrintTicket)

获取一个 MemoryStream 对象,该对象指定 XML 格式的打印机功能,该格式符合打印架构Gets a MemoryStream object that specifies the printer's capabilities in an XML format that complies with the Print Schema.

注解

所使用的 XML 架构称为 "PrintCapabilities",它是Print schema系统的一部分。The XML schema used is called "PrintCapabilities," a part of the Print Schema system.

GetPrintCapabilitiesAsXml()

获取一个 MemoryStream 对象,该对象将打印机的功能指定为遵从打印架构的 XML 流。Gets a MemoryStream object that specifies the printer's capabilities as an XML stream that complies with the Print Schema.

public:
 System::IO::MemoryStream ^ GetPrintCapabilitiesAsXml();
public System.IO.MemoryStream GetPrintCapabilitiesAsXml ();
member this.GetPrintCapabilitiesAsXml : unit -> System.IO.MemoryStream
Public Function GetPrintCapabilitiesAsXml () As MemoryStream

返回

使用属于打印架构系统一部分的 XML 架构“PrintCapabilities”,指定打印机功能的 MemoryStreamA MemoryStream specifying the printer's capabilities by using the XML schema "PrintCapabilities," a part of the Print Schema system.

异常

未能检索到打印功能。The print capabilities could not be retrieved.

安全性

PrintingPermission
获取打印功能的权限。for permission to get print capabilities. 关联的枚举: DefaultPrintingAssociated enumeration: DefaultPrinting

GetPrintCapabilitiesAsXml(PrintTicket)

获取一个 MemoryStream 对象,该对象指定 XML 格式的打印机功能,该格式符合打印架构Gets a MemoryStream object that specifies the printer's capabilities in an XML format that complies with the Print Schema.

public:
 System::IO::MemoryStream ^ GetPrintCapabilitiesAsXml(System::Printing::PrintTicket ^ printTicket);
public System.IO.MemoryStream GetPrintCapabilitiesAsXml (System.Printing.PrintTicket printTicket);
member this.GetPrintCapabilitiesAsXml : System.Printing.PrintTicket -> System.IO.MemoryStream

参数

printTicket
PrintTicket

提供打印功能报告根据的打印票证。A print ticket that provides the basis on which the print capabilities are reported.

返回

使用属于打印架构系统一部分的 XML 架构“PrintCapabilities”,指定打印机功能的 MemoryStreamA MemoryStream specifying the printer's capabilities by using the XML schema "PrintCapabilities," a part of the Print Schema system.

异常

未能检索到打印功能。The print capabilities could not be retrieved.

printTicket 不符合标准格式。printTicket is not well-formed.

注解

PrintTicket 参数将用作构造打印功能 XML 的基础。The PrintTicket parameter is used as the basis on which to construct the print capabilities XML. 例如,假设打印机仅支持输入纸盒1中的媒体类型 A 和 B,并且仅支持输入纸盒2中的媒体类型 C。For example, suppose the printer supported only media types A and B from input bin 1 and it only supported media type C from input bin 2. 如果 printTicket 参数指定了输入纸盒1,则返回的打印功能 XML 将包含全部三种媒体类型,但会将类型 C 报告为 "约束"。If the printTicket parameter specified input bin 1, then the print capabilities XML that is returned would include all three media types, but it would report type C as "constrained." 如果 printTicket 参数指定了输入纸盒2,则返回的打印功能 XML 将包含全部三种媒体类型,但会将类型 A 和 B 报告为 "约束"。If the printTicket parameter specified input bin 2, then the print capabilities XML that is returned would include all three media types, but it would report types A and B as "constrained." 有关约束的详细信息,请参阅打印架构See the Print Schema for more information on constraints.

如果 null``printTicket,则使用 UserPrintTicketIf printTicket is null, the UserPrintTicket is used.

安全性

PrintingPermission
获取打印功能的权限。for permission to get print capabilities. 关联的枚举: DefaultPrintingAssociated enumeration: DefaultPrinting

适用于