The ISO/IEC 29341-7-1 standard defines the UPnP Printer Device template, providing a standardized interface for network-connected printers. This standard enables automatic discovery, configuration, and print-job management across heterogeneous networks without vendor-specific drivers. It is part of the UPnP Device Architecture and specifies two service templates: PrintBasic for simple printing and PrintEnhanced for advanced job control.
The UPnP Printer Device eliminates the need for per-vendor print drivers on mobile and IoT platforms. A UPnP-enabled printer can receive print jobs from any control point on the network — phones, tablets, laptops, or IoT gateways — using the standard PrintBasic or PrintEnhanced templates.
Device and Service Architecture
The UPnP Printer Device template defines two mandatory services and one optional service:
| Service |
Requirement |
Description |
| PrintBasic |
Mandatory |
Provides basic printing capabilities: submit a print job, query job status, and retrieve printer capabilities. Suitable for simple text and image printing. |
| PrintEnhanced |
Mandatory |
Extends PrintBasic with advanced features: job queuing, job cancellation, printer maintenance operations, and detailed job accounting. |
| JobHistory |
Optional |
Maintains a history of completed print jobs, including page count, timestamps, and error codes for auditing and usage tracking. |
Each service exposes a set of state variables and actions. The Printer Device also inherits the standard UPnP Device properties such as friendly name, manufacturer, model description, and UDN (Unique Device Name), which are populated during the initial SSDP discovery handshake.
The UPnP Printer Device architecture decouples the print service from the transport protocol. While UPnP eventing and control occur over HTTP-UDP, the actual print data transfer can use any protocol the device supports (IPP, raw TCP port 9100, or vendor-specific streaming).
PrintBasic Service — Core Printing Operations
The PrintBasic service provides the minimal set of operations for network printing. Its state variables describe the printer’s capabilities and current status:
- PrinterStatus — Current operational status: “idle”, “printing”, “stopped”, “offline”, “error”. Control points poll or subscribe to this variable for real-time status awareness.
- JobStatus — Status of the most recent or current job: “pending”, “processing”, “completed”, “cancelled”, “aborted”.
- JobName — Human-readable name of the current print job (e.g., “Q4_Report.pdf”).
- JobId — Unique numeric identifier assigned by the printer to each accepted job.
- PagesPrinted — Total page count for the current or most recent job.
The primary action is SubmitJob(JobName, DataType, Data), where the control point passes the print data as a base64-encoded string within the UPnP SOAP action. For large documents, the standard recommends using URI references instead of inline data: the control point provides a URI (e.g., http://fileserver/docs/report.pdf), and the printer fetches the document directly using HTTP GET. This avoids SOAP message size limits and improves reliability.
The inline data transfer method (base64 within SOAP) should only be used for small print jobs under 1 MB. For larger documents, use the URI-reference method to avoid SOAP fragmentation and timeout issues. Most enterprise printers enforce a default inline size limit of 4 MB.
PrintEnhanced Service — Advanced Job Management
The PrintEnhanced service adds sophisticated job management capabilities:
- CreateJob() — Creates a job context and returns a JobId. The control point then sends the document data in one or more SendData(JobId, DataChunk) calls, supporting streaming for large documents.
- CancelJob(JobId) — Cancels a queued or in-progress job. The printer releases held resources immediately.
- PauseJob() / ResumeJob() — Temporarily suspends and resumes the active job, useful for operator intervention (e.g., loading paper).
- GetJobAttributes(JobId) — Returns detailed job metadata: submission time, completion time, page count, document format, owner, and any error conditions.
The service also exposes PrinterAttributes state variables that describe the physical printer capabilities: supported media sizes (A4, Letter, Legal), color capability, duplex support, resolution (dpi), input tray configuration, and output bin capacity. Control points use these attributes to select appropriate print settings automatically.
When using the PrintEnhanced service’s streaming mode (CreateJob + multiple SendData calls), the printer must enforce a job timeout. If a subsequent SendData call is not received within 5 minutes (configurable), the job should be automatically cancelled and partially received data discarded. This prevents orphaned jobs from consuming printer memory indefinitely.
Network Deployment Best Practices
Discovery and Naming. Configure the UPnP-friendly name to include the printer location (e.g., “HP LaserJet — 3rd Floor East”). This helps users identify the correct printer in multi-printer environments. The UDN must remain stable across power cycles; store it in NVRAM during initial provisioning.
Security Considerations. UPnP Printer Devices should implement subnet-only access controls and, where possible, TLS-based eventing to prevent print-job interception. For sensitive documents, disable the inline data transfer method and enforce URI-based submission with HTTPS endpoints.
Frequently Asked Questions
Q: Can a UPnP Printer Device support both PrintBasic and PrintEnhanced simultaneously?
A: Yes, and this is the recommended configuration. PrintBasic provides broad compatibility with simple clients (e.g., IoT sensors printing status labels), while PrintEnhanced enables full job management for workstation clients.
Q: How does the UPnP Printer Device handle multiple simultaneous print jobs?
A: The PrintEnhanced service includes a job queue. Jobs are processed in FIFO order. The JobStatus variable reflects the state of each queued job individually. Control points can query the queue depth using the JobQueueSize state variable.
Q: What data formats does the standard require?
A: The standard mandates support for text/plain and application/postscript. Support for image/png, image/jpeg, application/pdf, and application/octet-stream (printer-specific) is optional but widely implemented.
Q: Can the printer notify control points when a job completes?
A: Yes. The JobStatus variable is evented. Control points subscribe to JobStatus change events and receive immediate notification when a job transitions to “completed”, “cancelled”, or “aborted”.