OutputQuality OutputQuality OutputQuality OutputQuality Enum

Definición

Especifica los tipos de calidad de salida de un dispositivo de impresión.Specifies the types of output quality for a print device.

public enum class OutputQuality
public enum OutputQuality
type OutputQuality = 
Public Enum OutputQuality
Herencia
OutputQualityOutputQualityOutputQualityOutputQuality

Campos

Automatic Automatic Automatic Automatic 1

Selecciona automáticamente un tipo de calidad basándose en el contenido de un trabajo de impresión.Automatically selects a quality type that is based on the contents of a print job.

Draft Draft Draft Draft 2

Calidad de borrador.Draft quality.

Fax Fax Fax Fax 3

Calidad de fax.Fax quality.

High High High High 4

Calidad superior a la normal.Higher than normal quality.

Normal Normal Normal Normal 5

Calidad normal.Normal quality.

Photographic Photographic Photographic Photographic 6

Calidad fotográfica.Photographic quality. Para obtener más información, vea Notas sobre OutputQuality.Photographic en la sección Comentarios.For more information, see Notes on OutputQuality.Photographic in the Remarks section.

Text Text Text Text 7

Calidad de texto.Text quality.

Unknown Unknown Unknown Unknown 0

La característica (cuyas opciones se representan mediante esta enumeración) está establecida en una opción no definida en el Esquema de impresión.The feature (whose options are represented by this enumeration) is set to an option not defined in the Print Schema.

Ejemplos

El ejemplo siguiente muestra cómo probar las capacidades de la impresora y configurar el trabajo de impresión para sacar provecho de ellas.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^ printCapabilites = printQueue->GetPrintCapabilities();

   // Modify PrintTicket
   if (printCapabilites->CollationCapability->Contains(Collation::Collated))
   {
      printTicket->Collation = Collation::Collated;
   }
   if (printCapabilites->DuplexingCapability->Contains(Duplexing::TwoSidedLongEdge))
   {
      printTicket->Duplexing = Duplexing::TwoSidedLongEdge;
   }
   if (printCapabilites->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 printCapabilites = printQueue.GetPrintCapabilities();

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

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

    if (printCapabilites.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 printCapabilites As PrintCapabilities = printQueue.GetPrintCapabilities()

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

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

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

    Return printTicket
End Function ' end:GetPrintTicketFromPrinter()

Comentarios

Los valores de este tipo se utilizan principalmente para estos fines:Use the values of this type primarily for these purposes:

El Unknown valor nunca se utiliza en las propiedades de PrintCapabilities objetos.The Unknown value is never used in properties of PrintCapabilities objects.

Nunca debe establecer un PrintTicket propiedad Unknown.You should never set a PrintTicket property to Unknown. Si algún otro PrintTicket generar la aplicación ha creado un documento PrintTicket que establece la característica de calidad de salida en una opción no reconocida (es decir, una opción que no está definida en el delesquemadeimpresión), un PrintTicket objeto en la aplicación que se construye con ese documento tendrá Unknown como el valor de la OutputQuality propiedad.If some other PrintTicket producing application has created a PrintTicket document that sets the output quality 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 OutputQuality property.

Aunque el PrintTicket y PrintCapabilities no se puede heredar las clases, puede ampliar el Print Schema para reconocer las características del dispositivo de impresión que no se recogen en el PrintTicket o PrintCapabilities clases.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. Para obtener más información, vea Cómo: Extender el esquema de impresión y crear nuevas clases de sistema de impresión.For more information see How to: Extend the Print Schema and Create New Print System Classes.

Notes on OutputQuality.PhotographicNotes on OutputQuality.Photographic

A partir de la .NET Framework 4.6.1.NET Framework 4.6.1, se mejora la calidad del resultado obtenida con el valor de papel fotográfico (en comparación con versiones anteriores de .NET Framework) al imprimir en una impresora basada en GDI y cuando se ejecuta en Windows 7 y versiones anteriores de la Windows Sistema operativo.Starting with the .NET Framework 4.6.1.NET Framework 4.6.1, the output quality obtained with the Photographic value is improved (compared to previous versions of the .NET Framework) when printing to a GDI-based printer and when running on Windows 7 and earlier versions of the Windows operating system.

Generar documentos con una mejor calidad de salida requiere archivos de mayor tamaño de impresión y los tiempos de espera.Producing documents with better output quality requires larger print spooler files and longer wait times. Si se encuentran estos efectos no deseados, puede usar en su lugar el valor superior.If these side effects are undesirable, you can instead use the High value.

Se aplica a

Consulte también: