← Web Printing API

WebPrinterStateReason

Returned detailed printer-state-reason values; consult the exact enum source for the complete list.

Syntax

enum WebPrinterStateReason { /* RFC 8011/CUPS values */ };

Inputs

This is output-only capability data; it is not an independent method parameter.

Outputs

Returned detailed printer-state-reason values; consult the exact enum source for the complete list. It appears in the containing API dictionary; it does not return a promise by itself.

Errors

Invalid values fail normal Web IDL conversion or the containing print-job validation; no separate exception algorithm is specified for this standalone type.

Context and permission

Available only through the proposed Web Printing API in its required secure isolated Window context; this type creates no additional permission.

Lifecycle

Capability and state values are snapshots returned by printer/job operations. Refresh the containing attributes before relying on current hardware support.

Examples

// Read this typed value from fresh printer attributes.
const attributes = await printer.fetchAttributes();
console.log(attributes);

Compatibility

Public status
ChromeProposed, not released; current service is ChromeOS+CUPS only.
AndroidChromeStatus is null; no public mobile release.

Security and privacy

Capabilities and state can fingerprint a printer and reveal printing activity; avoid exposing them to untrusted code.

Sources