PrintJobStatus enum
Represents the status of a print job.
Print Job Lifecycle
A print job typically progresses through several states from submission to completion. The exact flow can vary between operating systems.
Windows State Graph
A common lifecycle for a successful print job on Windows is:
pending -> spooling -> processing -> printed -> completed
- pending: The job is in the queue, waiting for its turn.
- spooling: The job's data is being written to a temporary file.
- processing: The spooled data is being sent to the printer.
- printed: The computer has finished sending all data to the printer.
- completed: The printer has finished the job, and it is removed from the queue.
Other states can interrupt this flow:
- Error States:
error,userIntervention,paperOut,offline,blocked. - User Actions:
paused,restarting,deleting->canceled.
CUPS (macOS & Linux) State Graph
A common lifecycle on CUPS-based systems is simpler:
pending -> processing -> completed
Other states can interrupt this flow: held, stopped, canceled, aborted.
Values
- pending → const PrintJobStatus
-
The job has been created but is not yet processing. It may be waiting for other jobs to complete.
- CUPS:
IPP_JOB_PENDING(3) - Windows: No status flags set (0)
- Example: A user sends a document to a busy office printer. The job enters the
pendingstate while it waits for two other documents to finish printing.
const PrintJobStatus('Pending') - CUPS:
- processing → const PrintJobStatus
-
The job is currently being sent to the printer or is being printed.
- CUPS:
IPP_JOB_PROCESSING(5) - Windows:
JOB_STATUS_PRINTING(16) - Example: After spooling, the job's data is actively being sent to the printer. The printer has started to pull paper and print the first page. The job is now
processing. This continues until the print process is finished.
const PrintJobStatus('Processing') - CUPS:
- printed → const PrintJobStatus
-
The job has finished sending data to the printer. On some systems, this may be a transitional state before
completed.- Windows:
JOB_STATUS_PRINTED(128) - Example: (Windows) The print spooler has successfully sent all pages of the document to the printer's internal buffer. The job is marked as
printed. The computer's role is done, but the printer might still be physically printing the last few pages before the job is finallycompleted.
const PrintJobStatus('Printed') - Windows:
- completed → const PrintJobStatus
-
The job has finished all processing and is considered fully complete.
- CUPS:
IPP_JOB_COMPLETED(9) - Windows:
JOB_STATUS_COMPLETE(4096) - Example: The printing process is finished, and all pages have been physically ejected from the printer. The job is removed from the active queue and marked as
completed.
const PrintJobStatus('Completed') - CUPS:
- canceled → const PrintJobStatus
-
The job was explicitly canceled by a user or an administrator.
- CUPS:
IPP_JOB_CANCELED(7) - Windows:
JOB_STATUS_DELETED(256) - Example: A user accidentally prints a 100-page document. They open the print queue and cancel the job before it finishes. The job's final status is
canceled.
const PrintJobStatus('Canceled') - CUPS:
- aborted → const PrintJobStatus
-
The job was aborted by the system due to an error or other condition.
- CUPS:
IPP_JOB_ABORTED(8) - Example: (CUPS) The printer loses power mid-print. When it comes back online, the CUPS server aborts the incomplete job.
const PrintJobStatus('Aborted') - CUPS:
- error → const PrintJobStatus
-
An error occurred that prevents the job from printing.
- Windows:
JOB_STATUS_ERROR(2) - Example: (Windows) The print driver is corrupted or incompatible with the data being sent, causing the job to enter an
errorstate.
const PrintJobStatus('Error') - Windows:
- unknown → const PrintJobStatus
-
The job status could not be determined.
- Example: The plugin receives a status code from the operating system that doesn't map to any known state.
const PrintJobStatus('Unknown') - held → const PrintJobStatus
-
The job is held and will not print until released.
- CUPS:
IPP_JOB_HELD(4) - Example: (CUPS) In a secure printing environment, a job is sent to the printer but is
helduntil the user authenticates at the printer with a badge.
const PrintJobStatus('Held') - CUPS:
- stopped → const PrintJobStatus
-
The printer has been stopped, and the job is paused.
- CUPS:
IPP_JOB_STOPPED(6) - Example: (CUPS) An administrator stops the printer queue to perform maintenance. All jobs in the queue, including the currently processing one, enter the
stoppedstate.
const PrintJobStatus('Stopped') - CUPS:
- paused → const PrintJobStatus
-
The job has been paused by a user or administrator.
- Windows:
JOB_STATUS_PAUSED(1) - Example: (Windows) A user pauses their own print job to change the paper tray, then resumes it. While paused, the job status is
paused.
const PrintJobStatus('Paused') - Windows:
- spooling → const PrintJobStatus
-
The job is being written to a spool file on the disk.
- Windows:
JOB_STATUS_SPOOLING(8) - Example: (Windows) A large PDF is being printed. The system first writes the print-ready data to a temporary file on the hard drive. During this process, the job is
spooling. Once finished, it will transition toprocessing.
const PrintJobStatus('Spooling') - Windows:
- deleting → const PrintJobStatus
-
The job is in the process of being deleted.
- Windows:
JOB_STATUS_DELETING(4) - Example: (Windows) After a job is canceled, it briefly enters the
deletingstate while the system cleans up its associated spool file.
const PrintJobStatus('Deleting') - Windows:
- restarting → const PrintJobStatus
-
The job has been restarted and is being printed again.
- Windows:
JOB_STATUS_RESTART(2048) - Example: (Windows) A job was blocked due to a printer error. After the error is resolved, the job is automatically
restarting.
const PrintJobStatus('Restarting') - Windows:
- offline → const PrintJobStatus
-
The printer is offline.
- Windows:
JOB_STATUS_OFFLINE(32) - Example: (Windows) A user tries to print to a network printer that is turned off. The job enters the queue with an
offlinestatus.
const PrintJobStatus('Offline') - Windows:
- paperOut → const PrintJobStatus
-
The printer is out of paper.
- Windows:
JOB_STATUS_PAPEROUT(64) - Example: (Windows) A multi-page document stops printing midway through. The job status changes to
paperOutand a notification appears on the user's screen.
const PrintJobStatus('Paper Out') - Windows:
- userIntervention → const PrintJobStatus
-
The printer requires user intervention (e.g., to load paper, fix a jam).
- Windows:
JOB_STATUS_USER_INTERVENTION(1024) - Example: (Windows) A paper jam occurs. The job status becomes
userInterventionuntil someone clears the jam.
const PrintJobStatus('User Intervention') - Windows:
- blocked → const PrintJobStatus
-
The job is blocked, for example, because a preceding job has an error.
- Windows:
JOB_STATUS_BLOCKED_DEVQ(512) - Example: (Windows) Job A has an error (e.g.,
paperOut). Job B, which was sent after Job A, is nowblockedand will not print until Job A is resolved or canceled.
const PrintJobStatus('Blocked') - Windows:
- retained → const PrintJobStatus
-
The job has completed but is retained in the queue for re-printing.
- Windows:
JOB_STATUS_RETAINED(8192) - Example: (Windows) A printer is configured to keep completed jobs. After printing, the job's status changes to
retained, allowing a user to easily reprint it from the queue history.
const PrintJobStatus('Retained') - Windows:
Properties
- description → String
-
A user-friendly description of the status.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromRaw(
int status) → PrintJobStatus - Creates a PrintJobStatus from a raw platform-specific integer value.
Constants
-
values
→ const List<
PrintJobStatus> - A constant List of the values in this enum, in order of their declaration.