次の方法で共有


OutputColor 列挙型

定義

灰色または濃淡を含むコンテンツを印刷する方法を指定します。

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

フィールド

名前 説明
Unknown 0

機能 (この列挙体によって表されるオプション) は、 印刷スキーマで定義されていないオプションに設定されます。

Color 1

カラーで印刷する出力。

Grayscale 2

グレースケールで印刷される出力。

Monochrome 3

単一の色で同じ強度で印刷される出力。

次の例は、この列挙を使用して 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のプロパティであるOutputColorCapability コレクションのメンバーとして、プリンターがサポートする出力の種類を指定します。 (多くのプリンターでは、複数の種類がサポートされています)。

  • PrintTicketOutputColor プロパティの値として、指定された種類の出力を生成するようにプリンターに指示します。

Unknown 値は、PrintCapabilities オブジェクトのプロパティでは使用されません。

PrintTicket プロパティを Unknown に設定しないでください。 出力色機能を認識できないオプション (つまり、印刷スキーマで定義されていないオプション) に設定する PrintTicket ドキュメントを他のアプリケーションPrintTicket作成した場合、そのドキュメントで作成されたアプリケーション内のPrintTicket オブジェクトは、OutputColor プロパティの値としてUnknownされます。

PrintTicketクラスとPrintCapabilities クラスは継承できませんが、印刷スキーマを拡張して、PrintTicketクラスまたはPrintCapabilities クラスで考慮されていない印刷デバイス機能を認識できます。 詳細については、「 方法: 印刷スキーマを拡張し、新しい印刷システム クラスを作成する」を参照してください。

適用対象

こちらもご覧ください