PrintJobStatus Enumeration
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Gibt den aktuellen Status eines Druckauftrags in einer Druckwarteschlange an.
Diese Enumeration unterstützt eine bitweise Kombination ihrer Memberwerte.
public enum class PrintJobStatus
[System.Flags]
public enum PrintJobStatus
[<System.Flags>]
type PrintJobStatus =
Public Enum PrintJobStatus
- Vererbung
- Attribute
Felder
Blocked | 512 | Der Druckauftrag wurde durch eine Fehlerbedingung, möglicherweise bei einem Druckauftrag vor diesem Auftrag in der Warteschlange, blockiert. |
Completed | 4096 | Der Druckauftrag ist abgeschlossen, einschließlich aller Verarbeitungsschritte nach dem Drucken. |
Deleted | 256 | Der Druckauftrag wurde aus der Warteschlange gelöscht, i. d. R. nach dem Drucken. |
Deleting | 4 | Der Druckauftrag wird gerade gelöscht. |
Error | 2 | Der Druckauftrag weist einen Fehlerzustand auf. |
None | 0 | Der Druckauftrag weist keinen angegebenen Zustand auf. |
Offline | 32 | Der Drucker ist offline. |
PaperOut | 64 | Für den Druckauftrag ist kein Papier mit der entsprechenden Größe vorhanden. |
Paused | 1 | Der Druckauftrag wurde angehalten. |
Printed | 128 | Der Druckauftrag wurde gedruckt. |
Printing | 16 | Der Druckauftrag wird gerade gedruckt. |
Restarted | 2048 | Der Druckauftrag wurde blockiert, aber neu gestartet. |
Retained | 8192 | Der Druckauftrag wurde nach dem Drucken in der Druckwarteschlange beibehalten. |
Spooling | 8 | Der Druckauftrag wird gerade in die Warteschlange gestellt. |
UserIntervention | 1024 | Der Drucker erfordert einen Benutzereingriff, um einen Fehlerzustand zu beheben. |
Beispiele
Im folgenden Beispiel wird gezeigt, wie Diese Enumeration bei der Diagnose eines Problems mit einem Druckauftrag verwendet wird.
// Check for possible trouble states of a print job using the flags of the JobStatus property
static void SpotTroubleUsingJobAttributes (PrintSystemJobInfo^ theJob)
{
if ((theJob->JobStatus & PrintJobStatus::Blocked) == PrintJobStatus::Blocked)
{
Console::WriteLine("The job is blocked.");
}
if (((theJob->JobStatus & PrintJobStatus::Completed) == PrintJobStatus::Completed)
||
((theJob->JobStatus & PrintJobStatus::Printed) == PrintJobStatus::Printed))
{
Console::WriteLine("The job has finished. Have user recheck all output bins and be sure the correct printer is being checked.");
}
if (((theJob->JobStatus & PrintJobStatus::Deleted) == PrintJobStatus::Deleted)
||
((theJob->JobStatus & PrintJobStatus::Deleting) == PrintJobStatus::Deleting))
{
Console::WriteLine("The user or someone with administration rights to the queue has deleted the job. It must be resubmitted.");
}
if ((theJob->JobStatus & PrintJobStatus::Error) == PrintJobStatus::Error)
{
Console::WriteLine("The job has errored.");
}
if ((theJob->JobStatus & PrintJobStatus::Offline) == PrintJobStatus::Offline)
{
Console::WriteLine("The printer is offline. Have user put it online with printer front panel.");
}
if ((theJob->JobStatus & PrintJobStatus::PaperOut) == PrintJobStatus::PaperOut)
{
Console::WriteLine("The printer is out of paper of the size required by the job. Have user add paper.");
}
if (((theJob->JobStatus & PrintJobStatus::Paused) == PrintJobStatus::Paused)
||
((theJob->HostingPrintQueue->QueueStatus & PrintQueueStatus::Paused) == PrintQueueStatus::Paused))
{
HandlePausedJob(theJob);
//HandlePausedJob is defined in the complete example.
}
if ((theJob->JobStatus & PrintJobStatus::Printing) == PrintJobStatus::Printing)
{
Console::WriteLine("The job is printing now.");
}
if ((theJob->JobStatus & PrintJobStatus::Spooling) == PrintJobStatus::Spooling)
{
Console::WriteLine("The job is spooling now.");
}
if ((theJob->JobStatus & PrintJobStatus::UserIntervention) == PrintJobStatus::UserIntervention)
{
Console::WriteLine("The printer needs human intervention.");
}
};
// Check for possible trouble states of a print job using the flags of the JobStatus property
internal static void SpotTroubleUsingJobAttributes(PrintSystemJobInfo theJob)
{
if ((theJob.JobStatus & PrintJobStatus.Blocked) == PrintJobStatus.Blocked)
{
Console.WriteLine("The job is blocked.");
}
if (((theJob.JobStatus & PrintJobStatus.Completed) == PrintJobStatus.Completed)
||
((theJob.JobStatus & PrintJobStatus.Printed) == PrintJobStatus.Printed))
{
Console.WriteLine("The job has finished. Have user recheck all output bins and be sure the correct printer is being checked.");
}
if (((theJob.JobStatus & PrintJobStatus.Deleted) == PrintJobStatus.Deleted)
||
((theJob.JobStatus & PrintJobStatus.Deleting) == PrintJobStatus.Deleting))
{
Console.WriteLine("The user or someone with administration rights to the queue has deleted the job. It must be resubmitted.");
}
if ((theJob.JobStatus & PrintJobStatus.Error) == PrintJobStatus.Error)
{
Console.WriteLine("The job has errored.");
}
if ((theJob.JobStatus & PrintJobStatus.Offline) == PrintJobStatus.Offline)
{
Console.WriteLine("The printer is offline. Have user put it online with printer front panel.");
}
if ((theJob.JobStatus & PrintJobStatus.PaperOut) == PrintJobStatus.PaperOut)
{
Console.WriteLine("The printer is out of paper of the size required by the job. Have user add paper.");
}
if (((theJob.JobStatus & PrintJobStatus.Paused) == PrintJobStatus.Paused)
||
((theJob.HostingPrintQueue.QueueStatus & PrintQueueStatus.Paused) == PrintQueueStatus.Paused))
{
HandlePausedJob(theJob);
//HandlePausedJob is defined in the complete example.
}
if ((theJob.JobStatus & PrintJobStatus.Printing) == PrintJobStatus.Printing)
{
Console.WriteLine("The job is printing now.");
}
if ((theJob.JobStatus & PrintJobStatus.Spooling) == PrintJobStatus.Spooling)
{
Console.WriteLine("The job is spooling now.");
}
if ((theJob.JobStatus & PrintJobStatus.UserIntervention) == PrintJobStatus.UserIntervention)
{
Console.WriteLine("The printer needs human intervention.");
}
}//end SpotTroubleUsingJobAttributes
' Check for possible trouble states of a print job using the flags of the JobStatus property
Friend Shared Sub SpotTroubleUsingJobAttributes(ByVal theJob As PrintSystemJobInfo)
If (theJob.JobStatus And PrintJobStatus.Blocked) = PrintJobStatus.Blocked Then
Console.WriteLine("The job is blocked.")
End If
If ((theJob.JobStatus And PrintJobStatus.Completed) = PrintJobStatus.Completed) OrElse ((theJob.JobStatus And PrintJobStatus.Printed) = PrintJobStatus.Printed) Then
Console.WriteLine("The job has finished. Have user recheck all output bins and be sure the correct printer is being checked.")
End If
If ((theJob.JobStatus And PrintJobStatus.Deleted) = PrintJobStatus.Deleted) OrElse ((theJob.JobStatus And PrintJobStatus.Deleting) = PrintJobStatus.Deleting) Then
Console.WriteLine("The user or someone with administration rights to the queue has deleted the job. It must be resubmitted.")
End If
If (theJob.JobStatus And PrintJobStatus.Error) = PrintJobStatus.Error Then
Console.WriteLine("The job has errored.")
End If
If (theJob.JobStatus And PrintJobStatus.Offline) = PrintJobStatus.Offline Then
Console.WriteLine("The printer is offline. Have user put it online with printer front panel.")
End If
If (theJob.JobStatus And PrintJobStatus.PaperOut) = PrintJobStatus.PaperOut Then
Console.WriteLine("The printer is out of paper of the size required by the job. Have user add paper.")
End If
If ((theJob.JobStatus And PrintJobStatus.Paused) = PrintJobStatus.Paused) OrElse ((theJob.HostingPrintQueue.QueueStatus And PrintQueueStatus.Paused) = PrintQueueStatus.Paused) Then
HandlePausedJob(theJob)
'HandlePausedJob is defined in the complete example.
End If
If (theJob.JobStatus And PrintJobStatus.Printing) = PrintJobStatus.Printing Then
Console.WriteLine("The job is printing now.")
End If
If (theJob.JobStatus And PrintJobStatus.Spooling) = PrintJobStatus.Spooling Then
Console.WriteLine("The job is spooling now.")
End If
If (theJob.JobStatus And PrintJobStatus.UserIntervention) = PrintJobStatus.UserIntervention Then
Console.WriteLine("The printer needs human intervention.")
End If
End Sub
Hinweise
Diese Enumeration wird hauptsächlich als Wert der JobStatus -Eigenschaft verwendet.