共用方式為


PageOrientation 列舉

定義

指定內容頁面在列印媒體上的方向。

public enum class PageOrientation
public enum PageOrientation
type PageOrientation = 
Public Enum PageOrientation
繼承
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

備註

針對下列用途,請使用此類型的值:

未知的值永遠不會用在 對象的屬性PrintCapabilities中。

您不應該將 PrintTicket 屬性設定為 Unknown。 如果某些其他 PrintTicket 產生應用程式已建立 PrintTicket 檔 ,將方向功能設定為無法辨識的選項 (,則未在 列印架構) 中定義的選項,則 PrintTicket 以該檔建構的 應用程式中的物件將會有 [未知 ] 做為 屬性的值 PageOrientation

PrintTicket雖然 無法繼承 和 PrintCapabilities 類別,但您可以擴充列印架構,以辨識未在 或 PrintCapabilities 類別中考慮的PrintTicket列印裝置功能。 如需詳細資訊,請參閱 如何:擴充列印架構和建立新的列印系統類別

適用於

另請參閱