PrintCapabilities Constructor (Stream)

 

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.

Namespace:   System.Printing
Assembly:  ReachFramework (in ReachFramework.dll)

public PrintCapabilities(
	Stream xmlStream
)

Parameters

xmlStream
Type: System.IO.Stream

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

Exception Condition
ArgumentNullException

xmlStream is null.

FormatException

xmlStream is not valid XML.

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.

.NET Framework
Available since 3.0
Return to top
Show: