XpsDocumentWriter.Write Method (String)

 
System_CAPS_noteNote

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

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
Available since 3.0
Return to top
Show: