Stapling Sabit listesi
Tanım
Bir yazıcının çok sayfalı bir belgeyi Zımba ve nerede zımbalıp içermediğini belirtir.Specifies whether, and where, a printer staples a multi-page document.
public enum class Stapling
public enum Stapling
type Stapling =
Public Enum Stapling
- Devralma
Alanlar
None | 10 | Belge Zımbalanmış değil.The document is not stapled. |
SaddleStitch | 1 | Katlama çizgisi üzerinde birden çok zımba.Multiple staples along the fold line. Tel dikiş zımbalama da denir.Also called saddle-stitch stapling. |
StapleBottomLeft | 2 | Sol alt köşedeki tek bir zımba.A single staple in the lower-left corner. |
StapleBottomRight | 3 | Sağ alt köşedeki tek bir zımba.A single staple in the lower-right corner. |
StapleDualBottom | 7 | Alt kenar üzerinde iki zımba.Two staples along the lower edge. |
StapleDualLeft | 4 | Sol kenar üzerinde iki zımba.Two staples along the left edge. |
StapleDualRight | 5 | Sağ kenar üzerinde iki zımba.Two staples along the right edge. |
StapleDualTop | 6 | Üst kenar üzerinde iki zımba.Two staples along the upper edge. |
StapleTopLeft | 8 | Sol üst köşedeki tek bir zımba.A single staple in the upper-left corner. |
StapleTopRight | 9 | Sağ üst köşedeki tek bir zımba.A single staple in the upper-right corner. |
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, StaplingCapability PrintCapabilities Bu değerler bir yazıcının desteklediği zımbalama türlerini gösterir.As members of the StaplingCapability collection, which is a property of PrintCapabilities, these values indicate the types of stapling that a printer supports.
StaplingÖğesinin özelliğinin değeri olarak PrintTicket , değeri, yazıcıya ve nereye zımbalayın.As the value of the Stapling property of a PrintTicket, the value instructs the printer whether, and where, to staple.
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
. Diğer PrintTicket bir oluşturulan uygulama, zımbalama özelliğini tanınmayan bir seçeneğe (yani, yazdırma şemasındatanımlı olmayan 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 Stapling .If some other PrintTicket producing application has created a PrintTicket document that sets the stapling 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 Stapling 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.