PageOrientation Enum

Definisi

Menentukan bagaimana halaman isi berorientasi pada media cetak.

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

Bidang

Landscape 1

Konten area yang dapat digambarkan diputar pada halaman 90 derajat berlawanan arah jaring bolak-balik dari orientasi standar (potret).

Portrait 2

Orientasi standar.

ReverseLandscape 3

Konten area yang dapat digambarkan diputar pada halaman 90 derajat searah jarang dari orientasi standar (potret).

ReversePortrait 4

Konten area yang dapat digambarkan terbalik relatif terhadap orientasi standar (potret).

Unknown 0

Fitur (yang opsinya diwakili oleh enumerasi ini) diatur ke opsi yang tidak ditentukan dalam Skema Cetak.

Contoh

Contoh berikut menunjukkan cara menggunakan enumerasi ini untuk mengatur PrintTicket nilai.

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

Keterangan

Gunakan nilai jenis ini terutama untuk tujuan ini:

Nilai Tidak Diketahui tidak pernah digunakan dalam properti PrintCapabilities objek.

Anda tidak boleh menyetel PrintTicket properti ke Tidak Diketahui. Jika beberapa aplikasi produksi lainnya PrintTicket telah membuat dokumen PrintTicket yang mengatur fitur orientasi ke opsi yang tidak dikenal (yaitu, opsi yang tidak ditentukan dalam Skema Cetak), maka PrintTicket objek dalam aplikasi Anda yang dibangun dengan dokumen tersebut akan memiliki Tidak Diketahui sebagai nilai PageOrientation properti.

PrintTicket Meskipun kelas dan PrintCapabilities tidak dapat diwariskan, Anda dapat memperluas Skema Cetak untuk mengenali fitur perangkat cetak yang tidak diperkirakan di PrintTicket kelas atau PrintCapabilities . Untuk informasi selengkapnya, lihat Cara: Memperluas Skema Cetak dan Create Kelas Sistem Cetak Baru.

Berlaku untuk

Lihat juga