Redigeeri

Jagamisviis:


PrintCapabilities(Stream) Constructor

Definition

Initializes a new instance of the PrintCapabilities class by using an XML stream (that contains a PrintCapabilities document) that specifies printer capabilities and complies with the XML Print Schema.

public:
 PrintCapabilities(System::IO::Stream ^ xmlStream);
public PrintCapabilities (System.IO.Stream xmlStream);
new System.Printing.PrintCapabilities : System.IO.Stream -> System.Printing.PrintCapabilities
Public Sub New (xmlStream As Stream)

Parameters

xmlStream
Stream

An XML Stream that describes printer capabilities and conforms to the Print Schema.

Exceptions

xmlStream is null.

xmlStream is not valid XML.

Remarks

The entire PrintCapabilities document is stored in a non-public field in the object, including the XML elements within it that express less common features that are not represented by any of the public properties of the PrintCapabilities class. In fact, if the driver that produced the PrintCapabilities document is using a private extension of the Print Schema, that privately defined markup is also stored as part of the non-public PrintCapabilities document.

The private parts of the document, if any, are not validated by the constructor, but all Print Schema-defined parts are validated, including the parts that are not represented by any of the public properties of the PrintCapabilities class. Accordingly, the FormatException could be thrown even if all of the XML markup that corresponds to the public properties is valid.

Applies to