PageOrientation 枚举

定义

指定如何在打印介质上确定内容页的方向。Specifies how pages of content are oriented on print media.

public enum class PageOrientation
public enum PageOrientation
type PageOrientation = 
Public Enum PageOrientation
继承
PageOrientation

字段

Landscape 1

将成像区域的内容从标准(纵向)方向逆时针方向旋转 90 。Content of the imageable area is rotated on the page 90 degrees counterclockwise from standard (portrait) orientation.

Portrait 2

标准方向。Standard orientation.

ReverseLandscape 3

将成像区域的内容从标准(纵向)方向顺时针方向旋转 90 。Content of the imageable area is rotated on the page 90 degrees clockwise from standard (portrait) orientation.

ReversePortrait 4

将成像区域的内容倒置(相对于标准(纵向)方向)。Content of the imageable area is upside down relative to standard (portrait) orientation.

Unknown 0

该功能(其选项由此枚举表示)设置为未在打印架构中定义的选项。The feature (whose options are represented by this enumeration) is set to an option not defined in the Print Schema.

示例

下面的示例演示如何使用此枚举来设置PrintTicket值。The following example shows how to use this enumeration to set PrintTicket values.

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

注解

使用此类型的值主要用于以下目的:Use the values of this type primarily for these purposes:

PrintCapabilities对象的属性中从不使用未知值。The Unknown value is never used in properties of PrintCapabilities objects.

永远不应将PrintTicket属性设置为 "未知"。You should never set a PrintTicket property to Unknown. 如果生成应用PrintTicket程序的其他部分创建了一个PrintTicket 文档, 该文档将 "方向" 功能设置为无法识别的选项 (即, 未在打印 PrintTicket架构中定义的选项), 则使用该文档构造的应用程序将作为该PageOrientation属性的值未知。If some other PrintTicket producing application has created a PrintTicket document that sets the orientation feature to an unrecognized option (that is, an option that is not defined in the Print Schema), then a PrintTicket object in your application that is constructed with that document will have Unknown as the value of the PageOrientation property.

PrintTicket PrintCapabilities尽管和PrintTicket PrintCapabilities类不能被继承, 但你可以扩展打印架构来识别在或类中不考虑的打印设备功能。Although the PrintTicket and PrintCapabilities classes cannot be inherited, you can extend the Print Schema to recognize print device features that are not accounted for in the PrintTicket or PrintCapabilities classes. 有关详细信息,请参阅操作说明:扩展打印架构并创建新的打印系统类For more information see How to: Extend the Print Schema and Create New Print System Classes.

适用于

另请参阅