OutputColor Výčet
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
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
Pole
| Name | Hodnota | Description |
|---|---|---|
| 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. |
| Color | 1 | Výstup, který se vytiskne barvou |
| Grayscale | 2 | Výstup, který se vytiskne ve stupních šedé |
| Monochrome | 3 | Výstup, který se vytiskne v jedné barvě a se stejnou mírou intenzity. |
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
Pro tyto účely použijte hodnoty tohoto typu:
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 PrintTicket, oni směrují tiskárnu k vytvoření určeného typu výstupu.
Neznámá hodnota se nikdy nepoužívá ve vlastnostech PrintCapabilities objektů.
Nikdy byste neměli PrintTicket nastavovat vlastnost Unknown. Pokud některá jiná PrintTicket aplikace pro výrobu 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), PrintTicket pak objekt v aplikaci, který je vytvořen s tímto dokumentem, bude mít Unknown hodnotu OutputColor vlastnosti.
PrintTicket I když tyto třídy nelze PrintCapabilities dědit, můžete rozšířit schéma tisku tak, aby rozpoznalo funkce tiskového zařízení, které nejsou v sadě PrintTicket nebo PrintCapabilities třídách. Další informace naleznete v tématu Postupy: Rozšíření schématu tisku a vytvoření nových tříd systému tisku.