Universal Print troubleshooting - Understanding the stages of a print job
This article provides an overview of how a print job goes through different components of Universal Print and how its state gets updated.
User prints (from a client)
A user picks a Universal Print printer, selects desired print options and then clicks on the Print button. User may print from any of the following sources (we sometimes refer to them as clients):
- From Windows OS (PC, Windows 365, Azure Virtual Desktop etc.)
- From a web browser application like OneDrive for Business, Excel in the browser.
- Applications by other vendors or Line-of-business (LOB) applications developed using the Microsoft Graph APIs.
- Other clients (like Mac etc.).
Windows OS
Lets take an example of experience from Windows OS.
Once the user prints on Windows, here are the steps that take place:
- Application may use one of the Windows standard print dialog (like Notepad) or its own print dialog (e.g. Microsoft Office apps, Adobe Acrobat etc.). Either of these dialogs will send the print job to the Windows Print spooler running on Windows. For Universal Print, each printer uses the in-built Universal Print class driver. Spooler uses this driver to process the job further.
- Windows Print spooler may optionally invoke a Print Support Application (PSA) if the printer is associated to one and it is installed on the device. PSAs are typically published by printer OEMs and associated with their printer models. PSA may automatically get installed on Windows and linked to the printer.
- Windows Print spooler uploads the print job (metadata and payload) to Universal Print service. The job is sent using Internet Printing Protocol (IPP) over HTTPS. Port used for the given printer is named as IPP-GUID.
Print job in cloud
When a client sends print job to Universal Print service, it performs the following actions:
- Validates the print job. This ensures that the print job's attributes match attributes that were reported by the printer. Jobs that fail the validation are rejected and an error is returned to the client. Successfully validated jobs are stored in the cloud queue and are available in the Universal Print portal under the printer's Print Jobs. At this stage, job state will be either
Pending
orPaused
.- Job may be in a
Paused
state if the printer has secure release enabled and the job is waiting, or if there is a task triggered by a third-party cloud application. - If the printer does not have secure release or does not have a third-party task, then it will directly go to
Pending
state. Otherwise, it’s state will be change fromPaused
toPending
only after the job has been released or task has been marked as complete.
- Job may be in a
- For a
Pending
job, Universal Print notifies the corresponding printer that there is at least one print job waiting in cloud queue. Some printers (and Universal Print connector) are listening to these notifications in real time, whereas other printers may poll for such notifications periodically (e.g. every 30 seconds).
Print job at printer
- When a printer receives the notification, it may decide to process the print job immediately or wait (e.g. if printer is already busy printing another print job).
- Printer starts processing the job by first requesting list of ALL the
Pending
print jobs. Printer may decide to process these jobs one-by-one or may process multiple jobs in parallel. - For the job printer starts processing, it first claims the job by acknowledging it. This informs Universal Print that job is now locked for processing by the specific printer and the print job state changes to
Processing
. - Printer downloads the print job metadata and payload.
- Printer processes the print payload and prints.
- Note: In some cases, printer may acknowledge the job but may put the job on hold temporarily. During this time, printer may update the job state to
Processing-Stopped
in Universal Print.
- Note: In some cases, printer may acknowledge the job but may put the job on hold temporarily. During this time, printer may update the job state to
- Printer updates the job to one of the following "final" states:
Completed
: When the job is successfully printed.Aborted
: When the printers faced some problems and was unable to print the jobCanceled
: When a printer may have a display console, users see the list of their pending print jobs. They may select one or all and make the asCanceled
.
Print job processing by Universal Print connector
For printers that are registered via Universal Print connector, Connector performs the same steps that a typical printer would perform. However, it relays the job from Universal Print service to the actual printer.
Here are some differences in the flow for a connector:
- Universal Print service notifies the Connector for
Pending
jobs instead of the printer. - Universal Print Connector acknowledges and downloads the print job data. After getting the job, Connector calls Windows Print APIs to submit the job to Windows spooler on the Connector. Windows spooler leverages the printer driver to render the job, and then job is sent to the printer.
- For updating print job state:
- Printer sends the print job state to Windows spooler on the Connector.
- Connector polls for the job state from Windows spooler.
- When the job state is updated, it updates the same in the Universal Print service.
Note
If a given printer has multiple Pending
jobs, then Connector will process those jobs serially (one-by-one). Job being processed will show-up as Processing
, whereas print jobs after that on the same printer will be waiting and have state as Pending
. Jobs across different printers (on the same Connector) will be processed in parallel.