Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 CreateVisualsCollator Method (Print...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
SerializerWriter..::.CreateVisualsCollator Method (PrintTicket, PrintTicket)

When overridden in a derived class, returns a SerializerWriterCollator that writes collated Visual elements together with the given print tickets.

Namespace:  System.Windows.Documents.Serialization
Assembly:  PresentationFramework (in PresentationFramework.dll)
Visual Basic (Declaration)
Public MustOverride Function CreateVisualsCollator ( _
    documentSequencePT As PrintTicket, _
    documentPT As PrintTicket _
) As SerializerWriterCollator
Visual Basic (Usage)
Dim instance As SerializerWriter
Dim documentSequencePT As PrintTicket
Dim documentPT As PrintTicket
Dim returnValue As SerializerWriterCollator

returnValue = instance.CreateVisualsCollator(documentSequencePT, _
    documentPT)
C#
public abstract SerializerWriterCollator CreateVisualsCollator(
    PrintTicket documentSequencePT,
    PrintTicket documentPT
)
Visual C++
public:
virtual SerializerWriterCollator^ CreateVisualsCollator(
    PrintTicket^ documentSequencePT, 
    PrintTicket^ documentPT
) abstract
JScript
public abstract function CreateVisualsCollator(
    documentSequencePT : PrintTicket, 
    documentPT : PrintTicket
) : SerializerWriterCollator
XAML
You cannot use methods in XAML.

Parameters

documentSequencePT
Type: System.Printing..::.PrintTicket
The default print preferences for FixedDocumentSequence content.
documentPT
Type: System.Printing..::.PrintTicket
The default print preferences for FixedDocument content.

Return Value

Type: System.Windows.Documents.Serialization..::.SerializerWriterCollator
A SerializerWriterCollator that writes collated Visual elements to the document output serialization Stream.

documentSequencePT or documentPT can be nullNothingnullptra null reference (Nothing in Visual Basic) if there are no preferred print settings.

This method does not validate or modify the given print tickets for a particular PrintQueue. If needed, use the PrintQueue..::.MergeAndValidatePrintTicket method to create a PrintQueue-specific PrintTicket that is valid for a given printer.

Notes to Implementers:

CreateVisualsCollator should return a SerializerWriterCollator that writes to the same serialization Stream as the SerializerWriter that creates it.

The following example shows the use of the CreateVisualsCollator method. For the complete sample, see Saving an XPS Document Sample.

C#
private void SaveVisuals(XpsDocumentWriter xpsdw, List<Visual> vc)
{
    // Setup for writing multiple visuals
    VisualsToXpsDocument vToXpsD = (VisualsToXpsDocument)xpsdw.CreateVisualsCollator();

    // Iterate through all visuals in the collection
    foreach (Visual v in vc)
    {
        vToXpsD.Write(v);   //Write each visual to single page
    }

    // End writing multiple visuals
    vToXpsD.EndBatchWrite();
}

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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker