PrintJobStatus PrintJobStatus PrintJobStatus PrintJobStatus Enum

Definizione

Specifica lo stato corrente di un processo di stampa in una coda di stampa.Specifies the current status of a print job in a print queue.

Questa enumerazione ha un attributo FlagsAttribute che consente una combinazione bit per bit dei valori del relativo membro.

public enum class PrintJobStatus
[System.Flags]
public enum PrintJobStatus
type PrintJobStatus = 
Public Enum PrintJobStatus
Ereditarietà
PrintJobStatusPrintJobStatusPrintJobStatusPrintJobStatus
Attributi

Campi

Blocked Blocked Blocked Blocked 512

Il processo di stampa è stato bloccato da una condizione di errore, probabilmente su un processo di stampa precedente a questo nella coda.An error condition, possibly on a print job that precedes this one in the queue, blocked the print job.

Completed Completed Completed Completed 4096

Il processo di stampa è stato completato, inclusa l'eventuale elaborazione successiva alla stampa.The print job is complete, including any post-printing processing.

Deleted Deleted Deleted Deleted 256

Il processo di stampa è stato eliminato dalla coda, in genere al termine della stampa.The print job was deleted from the queue, typically after printing.

Deleting Deleting Deleting Deleting 4

È in corso l'eliminazione del processo di stampa.The print job is in the process of being deleted.

Error Error Error Error 2

Il processo di stampa è in stato di errore.The print job is in an error state.

None None None None 0

Lo stato del processo di stampa non è specificato.The print job has no specified state.

Offline Offline Offline Offline 32

La stampante non è in linea.The printer is offline.

PaperOut PaperOut PaperOut PaperOut 64

La stampante ha esaurito la carta del formato richiesto.The printer is out of the required paper size.

Paused Paused Paused Paused 1

Il processo di stampa è in pausa.The print job is paused.

Printed Printed Printed Printed 128

Il processo di stampa è stato completato.The print job printed.

Printing Printing Printing Printing 16

Il processo di stampa è in corso.The print job is now printing.

Restarted Restarted Restarted Restarted 2048

Il processo di stampa era bloccato ma è stato riavviato.The print job was blocked but has restarted.

Retained Retained Retained Retained 8192

Il processo di stampa viene mantenuto nella coda di stampa dopo la stampa.The print job is retained in the print queue after printing.

Spooling Spooling Spooling Spooling 8

Il processo di stampa è in fase di spooling.The print job is spooling.

UserIntervention UserIntervention UserIntervention UserIntervention 1024

La stampante necessita dell'intervento dell'utente per correggere una condizione di errore.The printer requires user action to fix an error condition.

Esempi

Nell'esempio seguente viene illustrato come utilizzare questa enumerazione viene rilevato un problema con un processo di stampa.The following example shows how to use this enumeration when diagnosing a problem with a print job.

// 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 'end SpotTroubleUsingJobAttributes

Commenti

Questa enumerazione viene utilizzata principalmente come valore del JobStatus proprietà.This enumeration is used primarily as the value of the JobStatus property.

Si applica a

Vedi anche