PageOrder 열거형

정의

인쇄 디바이스에서 여러 페이지로 된 문서를 앞에서부터 인쇄할지 또는 뒤에서부터 인쇄할지 여부를 지정합니다.Specifies whether a print device prints multi-page documents from front-to-back or back-to-front.

public enum class PageOrder
public enum PageOrder
type PageOrder = 
Public Enum PageOrder
상속
PageOrder

필드

Reverse 2

뒤에서부터 인쇄합니다.Output prints in back-to-front order.

Standard 1

앞에서부터 인쇄합니다.Output prints in front-to-back order.

Unknown 0

기능(이 열거형으로 해당 옵션이 나타나는 기능)은 인쇄 스키마에 정의되지 않은 옵션으로 설정됩니다.The feature (whose options are represented by this enumeration) is set to an option not defined in the Print Schema.

예제

다음 예에서는 프린터의 기능을 테스트 하 고 활용 하기 위해 인쇄 작업을 구성 하는 방법을 보여 줍니다.The following example shows how to test a printer's capabilities and configure the print job to take advantage of them.

// ---------------------- GetPrintTicketFromPrinter -----------------------
/// <summary>
///   Returns a PrintTicket based on the current default printer.</summary>
/// <returns>
///   A PrintTicket for the current local default printer.</returns>
PrintTicket^ GetPrintTicketFromPrinter ()
{
   PrintQueue^ printQueue = nullptr;

   LocalPrintServer^ localPrintServer = gcnew LocalPrintServer();

   // Retrieving collection of local printer on user machine
   PrintQueueCollection^ localPrinterCollection = localPrintServer->GetPrintQueues();

   System::Collections::IEnumerator^ localPrinterEnumerator = localPrinterCollection->GetEnumerator();

   if (localPrinterEnumerator->MoveNext())
   {
      // Get PrintQueue from first available printer
      printQueue = ((PrintQueue^)localPrinterEnumerator->Current);
   } else
   {
      return nullptr;
   }
   // Get default PrintTicket from printer
   PrintTicket^ printTicket = printQueue->DefaultPrintTicket;

   PrintCapabilities^ printCapabilities = printQueue->GetPrintCapabilities();

   // Modify PrintTicket
   if (printCapabilities->CollationCapability->Contains(Collation::Collated))
   {
      printTicket->Collation = Collation::Collated;
   }
   if (printCapabilities->DuplexingCapability->Contains(Duplexing::TwoSidedLongEdge))
   {
      printTicket->Duplexing = Duplexing::TwoSidedLongEdge;
   }
   if (printCapabilities->StaplingCapability->Contains(Stapling::StapleDualLeft))
   {
      printTicket->Stapling = Stapling::StapleDualLeft;
   }
   return printTicket;
};// end:GetPrintTicketFromPrinter()
// ---------------------- GetPrintTicketFromPrinter -----------------------
/// <summary>
///   Returns a PrintTicket based on the current default printer.</summary>
/// <returns>
///   A PrintTicket for the current local default printer.</returns>
private PrintTicket GetPrintTicketFromPrinter()
{
    PrintQueue printQueue = null;

    LocalPrintServer localPrintServer = new LocalPrintServer();

    // Retrieving collection of local printer on user machine
    PrintQueueCollection localPrinterCollection =
        localPrintServer.GetPrintQueues();

    System.Collections.IEnumerator localPrinterEnumerator =
        localPrinterCollection.GetEnumerator();

    if (localPrinterEnumerator.MoveNext())
    {
        // Get PrintQueue from first available printer
        printQueue = (PrintQueue)localPrinterEnumerator.Current;
    }
    else
    {
        // No printer exist, return null PrintTicket
        return null;
    }

    // Get default PrintTicket from printer
    PrintTicket printTicket = printQueue.DefaultPrintTicket;

    PrintCapabilities printCapabilities = printQueue.GetPrintCapabilities();

    // Modify PrintTicket
    if (printCapabilities.CollationCapability.Contains(Collation.Collated))
    {
        printTicket.Collation = Collation.Collated;
    }

    if ( printCapabilities.DuplexingCapability.Contains(
            Duplexing.TwoSidedLongEdge) )
    {
        printTicket.Duplexing = Duplexing.TwoSidedLongEdge;
    }

    if (printCapabilities.StaplingCapability.Contains(Stapling.StapleDualLeft))
    {
        printTicket.Stapling = Stapling.StapleDualLeft;
    }

    return printTicket;
}// end:GetPrintTicketFromPrinter()
' ---------------------- GetPrintTicketFromPrinter -----------------------
''' <summary>
'''   Returns a PrintTicket based on the current default printer.</summary>
''' <returns>
'''   A PrintTicket for the current local default printer.</returns>
Private Function GetPrintTicketFromPrinter() As PrintTicket
    Dim printQueue As PrintQueue = Nothing

    Dim localPrintServer As New LocalPrintServer()

    ' Retrieving collection of local printer on user machine
    Dim localPrinterCollection As PrintQueueCollection = localPrintServer.GetPrintQueues()

    Dim localPrinterEnumerator As System.Collections.IEnumerator = localPrinterCollection.GetEnumerator()

    If localPrinterEnumerator.MoveNext() Then
        ' Get PrintQueue from first available printer
        printQueue = CType(localPrinterEnumerator.Current, PrintQueue)
    Else
        ' No printer exist, return null PrintTicket
        Return Nothing
    End If

    ' Get default PrintTicket from printer
    Dim printTicket As PrintTicket = printQueue.DefaultPrintTicket

    Dim printCapabilities As PrintCapabilities = printQueue.GetPrintCapabilities()

    ' Modify PrintTicket
    If printCapabilities.CollationCapability.Contains(Collation.Collated) Then
        printTicket.Collation = Collation.Collated
    End If

    If printCapabilities.DuplexingCapability.Contains(Duplexing.TwoSidedLongEdge) Then
        printTicket.Duplexing = Duplexing.TwoSidedLongEdge
    End If

    If printCapabilities.StaplingCapability.Contains(Stapling.StapleDualLeft) Then
        printTicket.Stapling = Stapling.StapleDualLeft
    End If

    Return printTicket
End Function ' end:GetPrintTicketFromPrinter()

설명

이러한 목적을 위해 기본적으로이 형식의 값을 사용 합니다.Use the values of this type primarily for these purposes:

  • 멤버로 합니다 PageOrderCapability 의 속성, 컬렉션 PrintCapabilities, 이러한 값을 지 원하는 프린터 페이지 순서의 유형을 나타냅니다.As members of the PageOrderCapability collection, a property of PrintCapabilities, these values indicate the type of page order that a printer supports. (대부분의 프린터 두 유형 모두를 지원 합니다.)(Many printers support both types.)

  • 값으로는 PageOrder 의 속성을 PrintTicket, 지정 된 순서로 출력을 인쇄 하려면 프린터에 지시 합니다.As the value of the PageOrder property of a PrintTicket, the value directs a printer to print output in a specified order.

합니다 알 수 없는 의 속성에서 사용 되지 않았습니다. PrintCapabilities 개체입니다.The Unknown value is never used in properties of PrintCapabilities objects.

설정할 수 없습니다는 PrintTicket 속성을 알 수 없는합니다.You should never set a PrintTicket property to Unknown. 다른 경우 PrintTicket 생성을 PrintTicket 문서가 인식할 수 없는 옵션으로 페이지 순서 기능을 설정 하는 (에 정의 되지 않은 옵션 이므로 Print Schema)에 PrintTicket 해당 문서를 사용 하 여 생성 된 애플리케이션에서 개체에 포함 됩니다 알 수 없는 값으로는 PageOrder 속성입니다.If some other PrintTicket producing application has created a PrintTicket document that sets the page order feature to an unrecognized option (that is, an option that is not defined in the Print Schema), then a PrintTicket object in your application that is constructed with that document will have Unknown as the value of the PageOrder property.

하지만 합니다 PrintTicketPrintCapabilities 클래스를 상속할 수 없습니다, 확장할 수 있습니다는 인쇄 스키마 에서 처리 하지 않은 인쇄 디바이스 기능을 인식 하는 PrintTicket 또는 PrintCapabilities 클래스.Although the PrintTicket and PrintCapabilities classes cannot be inherited, you can extend the Print Schema to recognize print device features that are not accounted for in the PrintTicket or PrintCapabilities classes. 자세한 내용은 방법: 인쇄 스키마 확장 및 새 인쇄 시스템 클래스 만들기를참조 하세요.For more information see How to: Extend the Print Schema and Create New Print System Classes.

적용 대상

추가 정보