英語で読む

次の方法で共有


PageOrientation 列挙型

定義

ページの内容を印刷メディアに印刷する方向を指定します。

C#
public enum PageOrientation
継承
PageOrientation

フィールド

名前 説明
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;
}

注釈

この型の値は、主に次の目的に使用します。

  • のプロパティである コレクションのPageOrientationCapabilityPrintCapabilitiesメンバーとして、これらの値はプリンターがサポートする方向の種類を示します。

  • の プロパティPrintTicketPageOrientation値として、 値はプリンターに特定の向きを使用するように指示します。

Unknown 値は、オブジェクトのPrintCapabilitiesプロパティでは使用されません。

プロパティを Unknown に設定PrintTicketしないでください。 印刷方向機能を認識できないオプション (つまり、印刷スキーマPrintTicketで定義されていないオプション) に設定する PrintTicket ドキュメントを作成した他PrintTicketのアプリケーションがある場合、そのドキュメントで構築されたアプリケーション内のオブジェクトは、プロパティのPageOrientation値として Unknown になります。

クラスと PrintCapabilities クラスはPrintTicket継承できませんが、 クラスまたは 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

こちらもご覧ください