PageOrientation 枚举
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定如何在打印介质上确定内容页的方向。
public enum class PageOrientation
public enum PageOrientation
type PageOrientation =
Public Enum PageOrientation
- 继承
字段
Landscape | 1 | 将成像区域的内容从标准(纵向)方向逆时针方向旋转 90 。 |
Portrait | 2 | 标准方向。 |
ReverseLandscape | 3 | 将成像区域的内容从标准(纵向)方向顺时针方向旋转 90 。 |
ReversePortrait | 4 | 将成像区域的内容倒置(相对于标准(纵向)方向)。 |
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
注解
主要出于以下目的使用此类型的值:
作为集合的成员 PageOrientationCapability ,这是一个属性 PrintCapabilities,这些值指示打印机支持的方向类型。
作为 a PrintTicket属性的值PageOrientation,该值指示打印机使用特定方向。
未知 值永远不会用于对象的属性PrintCapabilities。
不应将属性设置为PrintTicket“未知”。 如果其他 PrintTicket 一些生成应用程序创建了一个 PrintTicket 文档 ,该文档将方向功能设置为无法识别的选项 (,则打印 架构) 中未定义的选项,则 PrintTicket 使用该文档构造的应用程序中的对象将具有 “未知 ”作为属性的值 PageOrientation 。
PrintTicket虽然不能继承和PrintCapabilities类,但可以扩展打印架构,以识别未在类PrintCapabilities中PrintTicket考虑的打印设备功能。 有关详细信息 ,请参阅如何:扩展打印架构并创建新的打印系统类。