v147 · JavaScript API · Isolated Web Apps

Print Preview Builder

Design a print layout, adjust paper size, orientation, and margins, then send to a real printer via navigator.printing.requestPrinter() (feature-detected) or fall back to window.print(). Reads printer capabilities when the API is available.

Isolated Web Apps only. navigator.printing is restricted to IWA-packaged apps. This demo calls the real API when available and falls back to window.print() otherwise. The capabilities panel uses a realistic mock when running outside an IWA context.
Page settings
5mm50mm
5mm50mm
Content
Live print preview
Printer capabilities

Why the Web Printing API matters

window.print() opens a dialog with no programmatic control. For kiosk apps, POS systems, and document-management tools built as Isolated Web Apps, navigator.printing unlocks printer selection, capability queries, duplex settings, and job-status events — all from JavaScript using the same IPP semantics as CUPS and the OS print subsystem.

References

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗