Поделиться через


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

Комментарии

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

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

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

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

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

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

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

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