|
|
Gets the number of copies of this print job to be printed
[Visual Basic] Public ReadOnly Property Copies As Integer [C#] public int Copies {get;} [C++] public: __property int get_Copies(); [JScript] public function get Copies() : int;
Gets the number of copies of this print job to print. If multiple copies are printed then the true total page count may be found by multiplying the Copies by the TotalPages
[Visual Basic] The following example prints the details of a job to a trace when a job is added to the queue being monitored
[Visual Basic]
Private mPr As PrinterMonitorComponent
Public Sub StartWatching(ByVal PrinterDeviceName As String)
mPr = New PrinterMonitorComponent()
'\\ For efficieny reasons, do not monitor printer information changed events
mPr.MonitorPrinterChangeEvent = False
AddHandler mPr.JobAdded, AddressOf Addedtest
mPr.ThreadTimeout = -1
mPr.DeviceName = PrinterDeviceName
End Sub
Public Sub Addedtest(ByVal sender As Object, ByVal e As EventArgs)
With CType(e, PrintJobEventArgs).PrintJob
Trace.WriteLine("Job deleted : - Details...")
Trace.WriteLine("** Colour: " & .Color.ToString)
Trace.WriteLine("** Copies: " & .Copies.ToString)
Trace.WriteLine("** Data Type: " & .DataType)
Trace.WriteLine("** Document: " & .Document)
Trace.WriteLine("** Printer Driver: " & .DriverName)
Trace.WriteLine("** Landscape?: " & .Landscape.ToString)
Trace.WriteLine("** Machine: " & .MachineName)
Trace.WriteLine("** User to notify: " & .NotifyUserName)
Trace.WriteLine("** Pages Printed: " & .PagesPrinted.ToString)
Trace.WriteLine("** Paper Source: " & .PaperSource.ToString)
Trace.WriteLine("** Position in the queue: " & .Position.ToString)
Trace.WriteLine("** Printer Name: " & .PrinterName)
Trace.WriteLine("** Printer Resolution: " & .PrinterResolutionKind.ToString)
Trace.WriteLine("** Print Processor Name: " & .PrintProcessorName)
Trace.WriteLine("** Parameters: " & .Parameters)
Trace.WriteLine("** Print Processor: " & .PrintProcessorName)
Trace.WriteLine("** Status: " & .StatusDescription)
Trace.WriteLine("** Total pages: " & .TotalPages.ToString)
Trace.WriteLine("** User name: " & .Username)
Trace.WriteLine("** Paper Kind: " & .PaperKind.ToString)
Trace.WriteLine("** Paper Length: " & .PaperLength.ToString)
Trace.WriteLine("** Paper Width: " & .PaperWidth.ToString)
Trace.WriteLine("** Status: Paused? " & .Paused.ToString)
Trace.WriteLine("** Status: Deleted? " & .Deleted.ToString)
Trace.WriteLine("** Status: Deleting? " & .Deleting.ToString)
Trace.WriteLine("** Status: User intervention required? " & .UserInterventionRequired.ToString)
End With
End Sub
Namespace: PrinterQueueWatch
Platforms: Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family
PrintJob overview , All PrintJob members