This documentation is archived and is not being maintained.

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 Class XpsDocumentWriter _
	Inherits SerializerWriter
Dim instance As XpsDocumentWriter

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 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0