VisualsToXpsDocument Class

VisualsToXpsDocument Class


Provides methods for writing Visual objects to XML Paper Specification (XPS) documents or to a print queue in batch mode. 

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

public class VisualsToXpsDocument : SerializerWriterCollator


Indicates that write operations can begin.(Overrides SerializerWriterCollator.BeginBatchWrite().)


Cancels a writing operation.(Overrides SerializerWriterCollator.Cancel().)GTMT


Cancels an writing operation.(Overrides SerializerWriterCollator.CancelAsync().)GTMT


Indicates that write operations must end.(Overrides SerializerWriterCollator.EndBatchWrite().)


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodWrite(Visual, PrintTicket)
System_CAPS_pubmethodWriteAsync(Visual, Object)

Writes a Visual to an XpsDocument or a PrintQueue and includes additional information that the caller wants to pass to an event handler. (Overrides SerializerWriterCollator.WriteAsync(Visual, Object).)GTMT

System_CAPS_pubmethodWriteAsync(Visual, PrintTicket)
System_CAPS_pubmethodWriteAsync(Visual, PrintTicket, Object)

Writes a Visual to an XpsDocument or a PrintQueue; also includes a PrintTicket and any additional information that the caller wants to pass to an event handler.(Overrides SerializerWriterCollator.WriteAsync(Visual, PrintTicket, Object).)GTMT

Because this class has no constructor, use the CreateVisualsCollator method to create an instance.

The VisualsToXpsDocument writes to the same target XpsDocument or PrintQueue as the XpsDocumentWriter that creates the VisualsToXpsDocument.

Each Visual becomes a page in the document.

Legacy Code Example

The following example shows how to create a visuals collator and use it to write to an XML Paper Specification (XPS) document.

Code snippet is not found. Confirm that the code snippet name 'XpsSave' is correct.

.NET Framework
Available since 3.0

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

Return to top
© 2015 Microsoft