OutputQuality Enumeración

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
OutputQuality

Campos

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 2

Calidad de borrador.Draft quality.

Fax 3

Calidad de fax.Fax quality.

High 4

Calidad superior a la normal.Higher than normal quality.

Normal 5

Calidad normal.Normal quality.

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 7

Calidad de texto.Text quality.

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

En el ejemplo siguiente se muestra cómo probar las capacidades de una impresora y configurar el trabajo de impresión para que pueda beneficiarse 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

Use los valores de este tipo principalmente para estos propósitos:Use the values of this type primarily for these purposes:

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

Nunca debe establecer una PrintTicket propiedad en. UnknownYou should never set a PrintTicket property to Unknown. Si alguna otra PrintTicket aplicación que produce ha creado un documento PrintTicket que establece la característica calidad de salida en una opción no reconocida (es decir, una opción que no está definida en el esquema de impresión) PrintTicket , un objeto de la aplicación que se crea con ese documento Unknown tendrá como 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 las PrintTicket clases PrintCapabilities y no se pueden heredar, puede extender el esquema de impresión para que reconozca las características del dispositivo de impresión que PrintTicket no se tienen en cuenta en las clases o. PrintCapabilitiesAlthough 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: Extienda el esquema de impresión y cree nuevas clasesdel 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 .NET Framework 4.6.1.NET Framework 4.6.1, se mejora la calidad de salida obtenida con el valor fotográfico (en comparación con las versiones anteriores del .NET Framework) cuando se imprime en una impresora basada en GDI y cuando se ejecuta en Windows 7 y versiones anteriores de 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.

La producción de documentos con una mejor calidad de salida requiere archivos de cola de impresión más grandes y tiempos de espera más largos.Producing documents with better output quality requires larger print spooler files and longer wait times. Si no desea estos efectos secundarios, puede usar en su lugar el valor alto.If these side effects are undesirable, you can instead use the High value.

Se aplica a

Consulte también: