PageOrientation Výčet

Definice

Určuje, jak jsou stránky obsahu orientované na tištěná média.

public enum class PageOrientation
public enum PageOrientation
type PageOrientation = 
Public Enum PageOrientation
Dědičnost
PageOrientation

Pole

Landscape 1

Obsah obrazové oblasti se na stránce otočí o 90 stupňů proti směru hodinových ručiček ze standardní orientace (na výšku).

Portrait 2

Standardní orientace.

ReverseLandscape 3

Obsah obrazové oblasti se na stránce otočí o 90 stupňů po směru hodinových ručiček ze standardní orientace (na výšku).

ReversePortrait 4

Obsah obrazové oblasti je vzhledem ke standardní orientaci (na výšku) vzhůru nohama.

Unknown 0

Funkce (jejíž možnosti jsou reprezentovány tímto výčtem) je nastavena na možnost, která není definována ve schématu tisku.

Příklady

Následující příklad ukazuje, jak použít tento výčet k nastavení PrintTicket hodnot.

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

Poznámky

Hodnoty tohoto typu používejte především pro tyto účely:

Neznámá hodnota se nikdy nepoužívá ve vlastnostech PrintCapabilities objektů.

Vlastnost byste nikdy neměli PrintTicket nastavovat na Neznámý. Pokud některá jiná PrintTicket aplikace vytvořila dokument PrintTicket , který nastaví funkci orientace na nerozpoznanou možnost (tj. možnost, která není definována ve schématu tisku), pak PrintTicket objekt v aplikaci, který je vytvořen s tímto dokumentem bude mít unknown jako hodnotu PageOrientation vlastnosti.

PrintTicket I když třídy a PrintCapabilities nelze dědit, můžete rozšířit schéma tisku, aby rozpoznalo funkce tiskového zařízení, které nejsou zohledněny ve PrintTicket třídách neboPrintCapabilities. Další informace naleznete v tématu Postupy: Rozšíření schématu tisku a Vytvoření nových tříd tiskového systému.

Platí pro

Viz také