OutputColor Výčet

Definice

Určuje, jak vytisknout obsah, který obsahuje barvu nebo odstíny šedé.

public enum class OutputColor
public enum OutputColor
type OutputColor = 
Public Enum OutputColor
Dědičnost
OutputColor

Pole

Color 1

Výstup, který se vytiskne barevně.

Grayscale 2

Výstup, který se vytiskne ve stupních šedé.

Monochrome 3

Výstup, který se vytiskne jednou barvou se stejnou mírou intenzity.

Unknown 0

Funkce (jejíž možnosti jsou reprezentovány tímto výčtem) je nastavena na možnost, která není definována ve schématu tisku.

Příklady

Následující příklad ukazuje, jak použít tento výčet k nastavení PrintTicket hodnot.

// 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

Poznámky

Hodnoty tohoto typu použijte pro tyto účely:

  • Jako členové OutputColorCapability kolekce, což je vlastnost PrintCapabilities, tyto hodnoty určují typy výstupu, které tiskárna podporuje. (Mnoho tiskáren podporuje více typů.)

  • Jako hodnota OutputColor vlastnosti PrintTicketsměrují tiskárnu tak, aby vytvořila určený typ výstupu.

Neznámá hodnota se nikdy nepoužívá ve vlastnostech PrintCapabilities objektů.

Vlastnost byste nikdy neměli PrintTicket nastavovat na Unknownhodnotu . Pokud některá jiná PrintTicket produkční aplikace vytvořila dokument PrintTicket , který nastaví funkci výstupní barvy na nerozpoznanou možnost (tj. možnost, která není definována ve schématu tisku), pak PrintTicket objekt v aplikaci, který je vytvořen s tímto dokumentem bude mít Unknown jako hodnotu OutputColor vlastnosti.

PrintTicket I když třídy a PrintCapabilities nelze dědit, můžete rozšířit schéma tisku, aby rozpoznalo funkce tiskového zařízení, které nejsou zohledněny ve PrintTicket třídách neboPrintCapabilities. Další informace naleznete v tématu Postupy: Rozšíření schématu tisku a Vytvoření nových tříd tiskového systému.

Platí pro

Viz také