PrintTicket.OutputColor 속성

정의

컬러 또는 회색조의 콘텐츠를 처리하는 방법을 나타내는 값을 가져오거나 설정합니다.

public:
 property Nullable<System::Printing::OutputColor> OutputColor { Nullable<System::Printing::OutputColor> get(); void set(Nullable<System::Printing::OutputColor> value); };
public System.Printing.OutputColor? OutputColor { get; set; }
member this.OutputColor : Nullable<System.Printing.OutputColor> with get, set
Public Property OutputColor As Nullable(Of OutputColor)

속성 값

Nullable<OutputColor>

컬러 또는 회색조의 콘텐츠를 처리하는 방법을 나타내는 OutputColor 값입니다.

예외

호출 코드가 이 속성을 OutputColor 열거형에 없는 값으로 설정하려고 한 경우

예제

다음 예제에서는이 속성을 사용 하 여 인쇄 작업을 구성 하는 방법을 보여 줍니다.

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

설명

null 값이이 속성은이 기능 설정 지정 되지 않았음을 의미 합니다. 또한 값이 null에서의 XML 버전을 PrintTicket (참조 SaveToGetXmlStream)이이 기능에 대 한 태그가 포함 되지 것입니다.

이 속성에 해당 합니다 Print SchemaPageOutputColor 키워드입니다.

프린터를 사용 하 여 지 원하는 옵션에 대 한 테스트 수를 OutputColorCapability 속성입니다.

적용 대상