PrintTicket.PageOrientation Özellik

Tanım

Sayfa içeriğinin yazdırma için nasıl yönlendirildiğini gösteren bir değer alır veya ayarlar.

public:
 property Nullable<System::Printing::PageOrientation> PageOrientation { Nullable<System::Printing::PageOrientation> get(); void set(Nullable<System::Printing::PageOrientation> value); };
public System.Printing.PageOrientation? PageOrientation { get; set; }
member this.PageOrientation : Nullable<System.Printing.PageOrientation> with get, set
Public Property PageOrientation As Nullable(Of PageOrientation)

Özellik Değeri

PageOrientation Sayfa içeriğinin nasıl yönlendirileceğini belirten bir değer, örneğin veya LandscapeReversePortrait.

Özel durumlar

Çağıran kod, özelliğini numaralandırmada olmayan bir değere ayarlamaya PageOrientation çalıştı.

Örnekler

Aşağıdaki örnekte, yazdırma işini yapılandırmak için bu özelliğin nasıl kullanılacağı gösterilmektedir.

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

Açıklamalar

null Bu özelliğin değeri, bu özellik ayarının belirtilmediği anlamına gelir. Ayrıca, değer olduğunda null, (bkzSaveTo. ve GetXmlStream) xml sürümleri PrintTicket bu özellik için herhangi bir işaretleme içermez.

Bu özellik, Yazdırma ŞemasınınPageOrientation anahtar sözcüğüne karşılık gelir.

özelliğini kullanarak PageOrientationCapability yazıcının desteklediği seçenekleri test edebilirsiniz.

Şunlara uygulanır