OutputColor Wyliczenie

Definicja

Określa sposób drukowania zawartości zawierającej kolor lub odcienie szarości.

public enum class OutputColor
public enum OutputColor
type OutputColor = 
Public Enum OutputColor
Dziedziczenie
OutputColor

Pola

Color 1

Dane wyjściowe, które są drukowane w kolorze.

Grayscale 2

Dane wyjściowe, które są drukowane w skali szarości.

Monochrome 3

Dane wyjściowe, które drukuje w jednym kolorze i o tym samym stopniu intensywności.

Unknown 0

Funkcja (której opcje są reprezentowane przez tę wyliczenie) jest ustawiona na opcję niezdefiniową w schemacie wydruku.

Przykłady

W poniższym przykładzie pokazano, jak używać tej wyliczenia do ustawiania PrintTicket wartości.

// Use different PrintTickets for different FixedDocuments.
PrintTicket ptFD = new PrintTicket();

if (_firstDocumentPrintTicket <= 1)
{   // Print the first document in black/white and in portrait
    // orientation.  Since the PrintTicket at the
    // FixedDocumentSequence level already specifies portrait
    // orientation, this FixedDocument can just inherit that
    // setting without having to set it again.
    ptFD.PageOrientation = PageOrientation.Portrait;
    ptFD.OutputColor = OutputColor.Monochrome;
    _firstDocumentPrintTicket++;
}

else // if (_firstDocumentPrintTicket > 1)
{   // Print the second document in color and in landscape
    // orientation.  Since the PrintTicket at the
    // FixedDocumentSequence level already specifies portrait
    // orientation, this FixedDocument needs to set its
    // PrintTicket with landscape orientation in order to
    // override the higher level setting.
    ptFD.PageOrientation = PageOrientation.Landscape;
    ptFD.OutputColor = OutputColor.Color;
}
' Use different PrintTickets for different FixedDocuments.
Dim ptFD As New PrintTicket()

If _firstDocumentPrintTicket <= 1 Then
    ' orientation.  Since the PrintTicket at the
    ' FixedDocumentSequence level already specifies portrait
    ' orientation, this FixedDocument can just inherit that
    ' setting without having to set it again.
    ptFD.PageOrientation = PageOrientation.Portrait
    ptFD.OutputColor = OutputColor.Monochrome
    _firstDocumentPrintTicket += 1

Else ' if (_firstDocumentPrintTicket > 1)
    ' orientation.  Since the PrintTicket at the
    ' FixedDocumentSequence level already specifies portrait
    ' orientation, this FixedDocument needs to set its
    ' PrintTicket with landscape orientation in order to
    ' override the higher level setting.
    ptFD.PageOrientation = PageOrientation.Landscape
    ptFD.OutputColor = OutputColor.Color
End If

Uwagi

Użyj wartości tego typu do następujących celów:

  • Jako członkowie OutputColorCapability kolekcji, która jest właściwością PrintCapabilities, te wartości określają typy danych wyjściowych, które obsługuje drukarka. (Wiele drukarek obsługuje więcej niż jeden typ).

  • Jako wartość OutputColor właściwości elementu PrintTicket, kierują drukarkę do utworzenia wyznaczonego typu danych wyjściowych.

Nieznana wartość nigdy nie jest używana we właściwościach PrintCapabilities obiektów.

Nigdy nie należy ustawiać PrintTicket właściwości na Unknown. Jeśli inna PrintTicket aplikacja produkująca utworzyła dokument PrintTicket , który ustawia funkcję koloru wyjściowego na nierozpoznaną opcję (czyli opcję, która nie jest zdefiniowana w schemacie drukowania), obiekt PrintTicket w aplikacji, który jest skonstruowany z tym dokumentem, będzie miał Unknown jako wartość OutputColor właściwości.

PrintTicket Mimo że klasy i PrintCapabilities nie mogą być dziedziczone, można rozszerzyć schemat wydruku, aby rozpoznawać funkcje urządzeń wydruku, które nie są uwzględniane w PrintTicket klasach lubPrintCapabilities. Aby uzyskać więcej informacji, zobacz How to: Extend the Print Schema and Create New Print System Classes (Instrukcje: rozszerzanie schematu wydruku) i Create New Print System Classes (Tworzenie nowych klas systemu drukowania).

Dotyczy

Zobacz też