XpsDocumentWriter.CreateVisualsCollator Método

Definición

Devuelve un objeto VisualsToXpsDocument que puede escribir objetos Visual en un documento o una cola de impresión.Returns a VisualsToXpsDocument that can write Visual objects to a document or print queue.

Sobrecargas

CreateVisualsCollator()

Devuelve un objeto VisualsToXpsDocument que puede escribir objetos Visual en un documento o una cola de impresión.Returns a VisualsToXpsDocument that can write Visual objects to a document or print queue.

CreateVisualsCollator(PrintTicket, PrintTicket)

Devuelve un objeto VisualsToXpsDocument que puede escribir objetos Visual con valores de PrintTicket en un documento XPS o una cola de impresión.Returns a VisualsToXpsDocument that can write Visual objects with PrintTicket settings to an XPS document or print queue.

Ejemplos

En el siguiente ejemplo, se muestra cómo utilizar el método CreateVisualsCollator.The following example shows how to use the CreateVisualsCollator method.

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();
}
Private Sub SaveVisuals(ByVal xpsdw As XpsDocumentWriter, ByVal vc As List(Of Visual))
    ' Setup for writing multiple visuals
    Dim vToXpsD As VisualsToXpsDocument = CType(xpsdw.CreateVisualsCollator(), VisualsToXpsDocument)

    ' Iterate through all visuals in the collection
    For Each v As Visual In vc
        vToXpsD.Write(v) 'Write each visual to single page
    Next v

    ' End writing multiple visuals
    vToXpsD.EndBatchWrite()
End Sub

Comentarios

VisualsToXpsDocumentEscribe en el mismo destino XpsDocument o PrintQueue como el XpsDocumentWriter que crea el VisualsToXpsDocument .The VisualsToXpsDocument writes to the same target XpsDocument or PrintQueue as the XpsDocumentWriter that creates the VisualsToXpsDocument.

CreateVisualsCollator()

Devuelve un objeto VisualsToXpsDocument que puede escribir objetos Visual en un documento o una cola de impresión.Returns a VisualsToXpsDocument that can write Visual objects to a document or print queue.

public:
 override System::Windows::Documents::Serialization::SerializerWriterCollator ^ CreateVisualsCollator();
public override System.Windows.Documents.Serialization.SerializerWriterCollator CreateVisualsCollator ();
override this.CreateVisualsCollator : unit -> System.Windows.Documents.Serialization.SerializerWriterCollator
Public Overrides Function CreateVisualsCollator () As SerializerWriterCollator

Devoluciones

SerializerWriterCollator

Nuevo objeto VisualsToXpsDocument.The new VisualsToXpsDocument.

Ejemplos

En el siguiente ejemplo, se muestra cómo utilizar el método CreateVisualsCollator.The following example shows how to use the CreateVisualsCollator method.

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();
}
Private Sub SaveVisuals(ByVal xpsdw As XpsDocumentWriter, ByVal vc As List(Of Visual))
    ' Setup for writing multiple visuals
    Dim vToXpsD As VisualsToXpsDocument = CType(xpsdw.CreateVisualsCollator(), VisualsToXpsDocument)

    ' Iterate through all visuals in the collection
    For Each v As Visual In vc
        vToXpsD.Write(v) 'Write each visual to single page
    Next v

    ' End writing multiple visuals
    vToXpsD.EndBatchWrite()
End Sub

Comentarios

VisualsToXpsDocumentEscribe en el mismo destino XpsDocument o PrintQueue como el XpsDocumentWriter que crea el VisualsToXpsDocument .The VisualsToXpsDocument writes to the same target XpsDocument or PrintQueue as the XpsDocumentWriter that creates the VisualsToXpsDocument.

Se aplica a

CreateVisualsCollator(PrintTicket, PrintTicket)

Devuelve un objeto VisualsToXpsDocument que puede escribir objetos Visual con valores de PrintTicket en un documento XPS o una cola de impresión.Returns a VisualsToXpsDocument that can write Visual objects with PrintTicket settings to an XPS document or print queue.

public:
 override System::Windows::Documents::Serialization::SerializerWriterCollator ^ CreateVisualsCollator(System::Printing::PrintTicket ^ documentSequencePrintTicket, System::Printing::PrintTicket ^ documentPrintTicket);
public override System.Windows.Documents.Serialization.SerializerWriterCollator CreateVisualsCollator (System.Printing.PrintTicket documentSequencePrintTicket, System.Printing.PrintTicket documentPrintTicket);
override this.CreateVisualsCollator : System.Printing.PrintTicket * System.Printing.PrintTicket -> System.Windows.Documents.Serialization.SerializerWriterCollator
Public Overrides Function CreateVisualsCollator (documentSequencePrintTicket As PrintTicket, documentPrintTicket As PrintTicket) As SerializerWriterCollator

Parámetros

documentSequencePrintTicket
PrintTicket

PrintTicket que especifica las preferencias de impresión predeterminadas de la secuencia de documentos.A PrintTicket that specifies the default printing preferences for the document sequence.

documentPrintTicket
PrintTicket

PrintTicket que representa las preferencias de impresión predeterminadas de cada documento.A PrintTicket that represents the default printing preferences for each document.

Devoluciones

SerializerWriterCollator

El nuevo objeto VisualsToXpsDocument que escribe elementos Visual con valores de PrintTicket en XpsDocument.The new VisualsToXpsDocument that writes Visual elements with PrintTicket settings to the XpsDocument.

Comentarios

VisualsToXpsDocumentEscribe en el mismo destino XpsDocument o PrintQueue como el XpsDocumentWriter que crea el VisualsToXpsDocument .The VisualsToXpsDocument writes to the same target XpsDocument or PrintQueue as the XpsDocumentWriter that creates the VisualsToXpsDocument.

Este método no valida ni modifica el especificado documentPrintTicket para un determinado PrintQueue .This method does not validate or modify the specified documentPrintTicket for a particular PrintQueue. Si es necesario, utilice el MergeAndValidatePrintTicket método para crear un PrintTicket que sea específico de PrintQueue y válido para una impresora especificada.If necessary, use the MergeAndValidatePrintTicket method to create a PrintTicket that is specific to the PrintQueue and valid for a specified printer.

Se aplica a