PageOrientation Wyliczenie

Definicja

Określa, w jaki sposób strony zawartości są zorientowane na nośniki drukowane.

public enum class PageOrientation
public enum PageOrientation
type PageOrientation = 
Public Enum PageOrientation
Dziedziczenie
PageOrientation

Pola

Landscape 1

Zawartość obszaru obrazu jest obracana na stronie 90 stopni w kierunku odwrotnym od standardowej (pionowej) orientacji.

Portrait 2

Orientacja standardowa.

ReverseLandscape 3

Zawartość obszaru obrazu jest obracana na stronie 90 stopni zgodnie z ruchem wskazówek zegara ze standardowej (pionowej) orientacji.

ReversePortrait 4

Zawartość obszaru z możliwością obrazu jest do góry nogami względem standardowej (pionowej) orientacji.

Unknown 0

Funkcja (której opcje są reprezentowane przez to wyliczenie) jest ustawiona na opcję niezdefiniową w schemacie wydruku.

Przykłady

W poniższym przykładzie pokazano, jak używać tego wyliczenia do ustawiania PrintTicket wartości.

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

Uwagi

Użyj wartości tego typu głównie w następujących celach:

Nieznana wartość nigdy nie jest używana we właściwościach PrintCapabilities obiektów.

Nigdy nie należy ustawiać PrintTicket właściwości na Nieznany. Jeśli inna PrintTicket aplikacja tworząca utworzyła dokument PrintTicket , który ustawia funkcję orientacji na nierozpoznaną opcję (czyli opcję, która nie jest zdefiniowana w schemacie wydruku), to PrintTicket obiekt w aplikacji, który jest skonstruowany z tym dokumentem, będzie miał wartość Nieznany jako wartość PageOrientation właściwości.

PrintTicket Mimo że klasy i PrintCapabilities nie mogą być dziedziczone, można rozszerzyć schemat wydruku w celu rozpoznawania funkcji urządzenia wydruku, które nie są uwzględniane w PrintTicket klasach lubPrintCapabilities. Aby uzyskać więcej informacji , zobacz How to: Extend the Print Schema and Create New Print System Classes (Instrukcje: rozszerzanie schematu wydruku) i Create New Print System Classes (Tworzenie nowych klas systemu wydruku).

Dotyczy

Zobacz też