XpsDocumentWriter Class

Provides methods to write to an XPS document or print queue.

Namespace: System.Windows.Xps
Assembly: System.Printing (in system.printing.dll)

public ref class XpsDocumentWriter : public SerializerWriter
public class XpsDocumentWriter extends SerializerWriter
public class XpsDocumentWriter extends SerializerWriter
Not applicable.

XpsDocumentWriter has no constructor. To create an XpsDocumentWriter, use the static CreateXpsDocumentWriter method of the XpsDocument class or use one of the static CreateXpsDocumentWriter methods of the PrintQueue class. The document or the queue that creates the XpsDocumentWriter becomes the target to which it writes.

The following example shows how to create an instance of the XpsDocumentWriter class.

_xpsDocument = new XpsDocument(containerName,FileAccess.ReadWrite);

XpsDocumentWriter xpsdw = XpsDocument.CreateXpsDocumentWriter(_xpsDocument);

For the complete sample, see Saving an XPS Document Sample.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions