Export (0) Print
Expand All

XpsDocumentWriter.Write Method (String)

Writes synchronously a specified XPS document to the target XpsDocument or PrintQueue.

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

public void Write(
	string documentPath
)

Parameters

documentPath
Type: System.String

The path of the source document.

Although the XpsDocument class has a singular name, an XpsDocument can be one FixedDocument or a set of multiple documents. This method adds the FixedDocument elements in the source to the set of FixedDocument elements in the target XpsDocument or PrintQueue.

This Write method will reserialize the specified XPS document which will remove all content from the Package that is not required to be preserved by the XML Paper Specification. The reserialization will also remove all extensions from the FixedPage markup, including any extended XPS content.

By design this Write method does not call the WritingPrintTicketRequired event.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft