← Web Printing API

v147 · proposed IWA API · member reference

WebPrinterAttributes

The capability and state dictionary returned by a cache read or refresh. Every member is optional in Web IDL; do not assume an unsupported printer reports a field.

Proposal and implementation differ from the old overviewChromeStatus currently records this API as Proposed, not shipped. This reference follows the current WICG IDL and Chromium source; test in the intended IWA configuration and feature-detect rather than relying on the v147 label.

Syntax

type WebPrinterAttributes = {
  printerName?: string; printerId?: string;
  copiesDefault?: number; copiesSupported?: { from?: number, to?: number };
  mediaColDefault?: MediaCollection; mediaColDatabase?: MediaCollection[];
  mediaSourceDefault?: string; mediaSourceSupported?: string[];
  documentFormatDefault?: "application/pdf";
  documentFormatSupported?: ("application/pdf")[];
  multipleDocumentHandlingDefault?: MultipleDocumentHandling;
  multipleDocumentHandlingSupported?: MultipleDocumentHandling[];
  orientationRequestedDefault?: "portrait" | "landscape";
  orientationRequestedSupported?: ("portrait" | "landscape")[];
  printerResolutionDefault?: Resolution; printerResolutionSupported?: Resolution[];
  printColorModeDefault?: "color" | "monochrome";
  printColorModeSupported?: ("color" | "monochrome")[];
  printQualityDefault?: "draft" | "normal" | "high";
  printQualitySupported?: ("draft" | "normal" | "high")[];
  sidesDefault?: Sides; sidesSupported?: Sides[];
  printerState?: "idle" | "processing" | "stopped";
  printerStateMessage?: string; printerStateReasons?: PrinterStateReason[];
};

Inputs

Output-only dictionary. Match a requested value against its corresponding *Supported field; a default is not proof of every option. Dimensions use PWG units (hundredths of a millimetre) in Chromium’s Mojo contract.

Outputs

Returned synchronously from cache or asynchronously from refresh. It contains no printer URI or raw OS identifier in current IDL.

Errors

There is no dictionary-specific error. A missing optional field is not an error; do not replace it with a guessed value.

Context and permission

The IDL requires a secure, isolated context. The specification also defines the web-printing Permissions Policy with default allowlist self; Chromium additionally checks an isolated context and cross-origin isolation before getPrinters(). The current proposal requires express, origin-specific consent triggered by enumeration. The exact chooser scope, persistence, and whether a later operation prompts again remain user-agent UX, not a settled web contract.

Lifecycle, cancellation, and cleanup

Initial cache only has name/ID. Refresh replaces attributes. Printer state is sampled by fetch; there is no printer-state event.

Examples

const attributes = await printer.fetchAttributes();
const canPrintA4 = attributes.mediaColDatabase?.some(({ mediaSizeName }) =>
  mediaSizeName === "iso_a4_210x297mm");
console.log({ canPrintA4, state: attributes.printerState });

Browser compatibility

Current public compatibility evidence (checked 2026-07-26)
RuntimeStatusEvidence
Chrome (general)Proposed and not released. ChromeStatus lists I2S desktop target 147, which is not release proof. Do not infer general desktop Chrome support.ChromeStatus
Current Chromium serviceImplemented only when built with IS_CHROMEOS && USE_CUPS; otherwise getPrinters() has no service and throws SecurityError.Chromium manager implementation
Android / mobileChromeStatus Android is null; no public mobile release exists. The current ChromeOS+CUPS-only service path does not expose the service on Android.ChromeStatus; implementation guard
FirefoxNo signal; no BCD member record found.ChromeStatus position; BCD API data
SafariNo signal; no BCD member record found.ChromeStatus position; BCD API data
webstatus.devNo feature entry found for this query; this is not proof of absence from browsers.webstatus query

Security and privacy

Printer names, IDs, capabilities and state can fingerprint a device and reveal printing activity. A compromised IWA could create unwanted jobs or denial of service. Minimize enumeration and polling, do not expose attributes to untrusted content, validate documents before submitting, and offer an app-level confirmation/audit trail. The spec requires isolation and consent; it does not make printer information non-sensitive.

Canonical sources