閱讀英文版本

分享方式:


PageOrientation 列舉

定義

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

C#
public enum PageOrientation
繼承
PageOrientation

欄位

名稱 Description
Landscape 1

頁面上可作為影像的區域內容會從標準 (直立) 方向逆時針旋轉 90 度。

Portrait 2

標準方向。

ReverseLandscape 3

頁面上可作為影像的區域內容會從標準 (直立) 方向順時針旋轉 90 度。

ReversePortrait 4

可做為影像的區域內容會相對於標準 (標準) 方向倒置。

Unknown 0

功能 (其選項由這個列舉表示) 設定為 列印結構描述中未定義的選項。

範例

下列範例示範如何使用這個列舉來設定 PrintTicket 值。

C#
// 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;
}

備註

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

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

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

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

適用於

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

另請參閱