PrintQueue.CreateXpsDocumentWriter Method (Double, Double)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Creates an XpsDocumentWriter object with the specified dimensions.

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

static member CreateXpsDocumentWriter : 
        width:float byref *
        height:float byref -> XpsDocumentWriter


Type: System.Double

The width of the XPS document.

Type: System.Double

The height of the XPS document.

Return Value

Type: System.Windows.Xps.XpsDocumentWriter

An XpsDocumentWriter that writes to an XPS stream. This can be null.

This method displays a PrintDialog requiring input from the user. If the user cancels or closes the dialog, the return value is null. As a consequence, the return value must be checked for null by your application.

.NET Framework
Available since 3.0
Return to top