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

Комментарии

Используйте значения этого типа для следующих целей:

  • Как члены OutputColorCapability коллекции, которая является свойством PrintCapabilities, эти значения указывают типы выходных данных, поддерживаемые принтером. (Многие принтеры поддерживают несколько типов.)

  • В качестве значения OutputColor свойства PrintTicketони направляют принтер на создание указанного типа выходных данных.

Значение Unknown никогда не используется в свойствах PrintCapabilities объектов .

Никогда не следует присваивать свойству PrintTicket значение Unknown. Если какое-то другое PrintTicket приложение создает документ PrintTicket , который задает для функции цвета вывода нераспознанный параметр (то есть параметр, который не определен в схеме печати), то PrintTicket объект в приложении, созданный с помощью этого документа, будет иметь Unknown в качестве значения OutputColor свойства .

PrintTicket Хотя классы и PrintCapabilities не могут быть унаследованы, можно расширить схему печати для распознавания функций устройства печати, которые не учитываются в PrintTicket классах или PrintCapabilities . Дополнительные сведения см. в разделах Практическое руководство. Расширение схемы печати и Создание новых системных классов печати.

Применяется к

См. также раздел