v147 · Print Job Builder
Print Job Builder
Configure a full IPP print job — copies, orientation, duplex, media size, colour mode — and submit it with printer.printJob(). Watch the job status progress through its lifecycle with event-driven updates.
IWA simulation. In a real Isolated Web App, the job is dispatched to an OS printer via IPP. This simulation runs the full job lifecycle in the browser with realistic delays and event payloads.
Job configuration
Generated IPP options object
{}
Job status
—
pending
processing
completed
Submit a job to see status events here.
API code
// In an Isolated Web App with navigator.printing available:
const [printer] = await navigator.printing.getPrinters();
// Build the IPP job ticket
const options = {
'media': 'na_letter_8.5x11in', // media-col or media keyword
'print-color-mode': 'monochrome', // color | monochrome | auto
'sides': 'two-sided-long-edge', // duplex mode
'orientation-requested': 'portrait', // portrait | landscape
'copies': 2,
'sheet-collate': 'collated',
};
// Fetch a Blob of the document to print (e.g. generate a PDF in-page)
const blob = await generatePDF(); // application/pdf
// Submit — returns a PrintJob object
const job = await printer.printJob(blob, options);
// Listen for status transitions
job.addEventListener('statechange', (event) => {
console.log(event.state); // 'pending' | 'processing' | 'completed' | 'aborted'
console.log(event.reasons); // e.g. ['none'] or ['media-empty']
});
console.log('Job ID:', job.id);
see also
- Printer Discovery — explore printer capabilities first
- ChromeStatus entry
- WICG/web-printing spec
- RFC 8011 — IPP/1.1
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗