共用方式為


OutputColor 列舉

定義

指定如何列印包含彩色或灰階的內容。

public enum class OutputColor
public enum OutputColor
type OutputColor = 
Public Enum OutputColor
繼承
OutputColor

欄位

Color 1

以彩色列印的輸出。

Grayscale 2

以灰階列印的輸出。

Monochrome 3

以單色和同等濃度列印的輸出。

Unknown 0

功能 (其選項由這個列舉表示) 設定為 列印結構描述中未定義的選項。

範例

下列範例示範如何使用這個列舉來設定 PrintTicket 值。

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

備註

針對下列用途,請使用此類型的值:

未知的值永遠不會用在 對象的屬性PrintCapabilities中。

您不應該將 PrintTicket 屬性設定為 Unknown。 如果某些其他 PrintTicket 產生應用程式已建立 PrintTicket 檔案 ,將輸出色彩特徵設定為無法辨識的選項 (,也就是在 列印架構) 中未定義的選項,則 PrintTicket 以該檔建構的應用程式中的物件將會具有 Unknown 屬性的值 OutputColor

PrintTicket雖然 無法繼承 和 PrintCapabilities 類別,但您可以擴充列印架構,以辨識未在 或 PrintCapabilities 類別中考慮的PrintTicket列印裝置功能。 如需詳細資訊,請參閱 如何:擴充列印架構和建立新的列印系統類別

適用於

另請參閱