OutputQuality Sabit listesi
Tanım
Yazdırma aygıtı için çıkış kalitesi türlerini belirtir.Specifies the types of output quality for a print device.
public enum class OutputQuality
public enum OutputQuality
type OutputQuality =
Public Enum OutputQuality
- Devralma
Alanlar
Automatic | 1 | , Bir yazdırma işinin içeriğine göre otomatik olarak bir kalite türü seçer.Automatically selects a quality type that is based on the contents of a print job. |
Draft | 2 | Taslak kalitesi.Draft quality. |
Fax | 3 | Faks kalitesi.Fax quality. |
High | 4 | Normal kaliteden daha yüksek.Higher than normal quality. |
Normal | 5 | Normal kalite.Normal quality. |
Photographic | 6 | Fotoğraf kalitesi.Photographic quality. Daha fazla bilgi için, açıklamalar bölümünde OutputQuality. fotonot bölümüne bakın.For more information, see Notes on OutputQuality.Photographic in the Remarks section. |
Text | 7 | Metin kalitesi.Text quality. |
Unknown | 0 | Özelliği (seçenekleri bu numaralandırma tarafından temsil edilir), yazdırma şemasındatanımlı olmayan bir seçeneğe ayarlanır.The feature (whose options are represented by this enumeration) is set to an option not defined in the Print Schema. |
Örnekler
Aşağıdaki örnek, bir yazıcının yeteneklerini test etmek ve yazdırma işinin bunlardan faydalanmak için nasıl yapılandırılacağını gösterir.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()
Açıklamalar
Bu amaçla öncelikle bu tür değerlerini kullanın:Use the values of this type primarily for these purposes:
Bir özelliği olan koleksiyonun üyeleri olarak, OutputQualityCapability PrintCapabilities Bu değerler bir yazıcının desteklediği çıkış kalitesi türlerini belirtir.As members of the OutputQualityCapability collection, which is a property of PrintCapabilities, these values indicate the types of output quality that a printer supports.
OutputQualityÖğesinin özelliğinin değeri olarak PrintTicket , belirli bir kalite oluşturmak için bir yazıcı yönlendirirler.As the value of the OutputQuality property of a PrintTicket, they direct a printer to produce a particular quality.
Unknown
Değer, nesne özelliklerinde hiçbir şekilde kullanılmaz PrintCapabilities .The Unknown
value is never used in properties of PrintCapabilities objects.
Asla bir PrintTicket özelliği olarak ayarlamanız gerekir Unknown
.You should never set a PrintTicket property to Unknown
. Başka bir oluşturulan PrintTicket uygulama, çıkış kalitesi özelliğini tanınmayan bir seçeneğe (yani, yazdırma şemasındatanımlanmamış bir seçeneğe) ayarlayan bir PrintTicket belgesi oluşturmışsa, PrintTicket Bu belgeyle oluşturulan uygulamanızdaki bir nesnenin Unknown
özelliğin değeri olması gerekir OutputQuality .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.
PrintTicketVe PrintCapabilities sınıfları devralınmayabilse de, veya sınıflarında için hesaba katılmaz olan yazdırma aygıtı özelliklerini tanımak Için Yazdırma şemasını genişletebilirsiniz 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. Daha fazla bilgi için bkz. nasıl yapılır: Yazdırma şemasını genişletme ve yeni yazdırma sistemi sınıfları oluşturma.For more information see How to: Extend the Print Schema and Create New Print System Classes.
OutputQuality. fotonot notlarıNotes on OutputQuality.Photographic
Sürümünden itibaren, .NET Framework 4.6.1.NET Framework 4.6.1 BIR GDI tabanlı yazıcıya yazdırırken ve Windows 7 ' de ve Windows işletim sisteminin önceki sürümlerinde çalışırken fotoğraf değeri ile elde edilen çıkış kalitesi geliştirilmiştir (.NET Framework önceki sürümleriyle karşılaştırıldığında).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.
Daha iyi çıkış kalitesiyle belge üretme, daha büyük yazdırma biriktiricisi dosyaları ve daha uzun bekleme süreleri gerektirir.Producing documents with better output quality requires larger print spooler files and longer wait times. Bu yan etkiler istenmeyen ise, bunun yerine yüksek değeri kullanabilirsiniz.If these side effects are undesirable, you can instead use the High value.