Skip to content
AnswerWell geo Documentation

Research · 7 min read · Answerwell

Extension Print Jobs: submitJob, Job Status, and Printer State

How Chrome extension printing on Chromebook works: permissions, submitJob, job and printer status codes, and printerProvider.

This page summarizes Google Chrome extension documentation for programmatic printing on Chromebook: the chrome.printing namespace (Manifest V3 extensions use the same API as browser.printing), optional chrome.printerProvider for extension-controlled printers, and chrome.printingMetrics for completed-job records. These APIs do not replace the normal Print Preview UI; they let kiosk, enterprise, and device-management extensions send PDF or image jobs to installed printers and observe job and printer state.

chrome.printing: when to use native print jobs from an extension

Section titled “chrome.printing: when to use native print jobs from an extension”

chrome.printing sends print jobs to printers already installed on the device. Google documents it as ChromeOS-only functionality tied to the printing manifest permission.

Use the chrome.printing API to send print jobs to printers installed on Chromebook.

— Google, chrome.printing API

Use this path when your extension must print without opening a full browser print dialog flow, or when you automate receipts, labels, or batch output on managed Chromebooks. If your extension implements a virtual or cloud-backed printer that Chrome’s print manager should list, use chrome.printerProvider instead—that API exposes events for the print manager to query your printers, read capabilities, and hand you jobs via onPrintRequested.

API Role Typical caller
chrome.printing Submit jobs to OS-installed printers App/kiosk extension on Chromebook
chrome.printerProvider Register printers owned by the extension Driver/backend extension
chrome.printingMetrics Read metadata for finished jobs Auditing, analytics extensions

printing permission and ChromeOS availability

Section titled “printing permission and ChromeOS availability”

All chrome.printing methods and events require the printing permission in the extension manifest. Google’s reference shows a minimal manifest snippet in the printing API availability section.

Manifest V3 documentation states Chrome 81+ for the namespace and notes that methods require browser.* naming where applicable since Chrome 148. Treat the API as unavailable on Windows, macOS, and Linux desktop Chrome unless Google’s current platform matrix says otherwise—the cluster sources consistently describe Chromebook targets only.

submitJob: ticket, document blob, and user confirmation

Section titled “submitJob: ticket, document blob, and user confirmation”

submitJob() is the core operation. Google lists three requirements in the submitJob examples:

  1. A ticket structure choosing printer capabilities (build it after getPrinterInfo() if the user must pick options).
  2. A SubmitJobRequest naming the printer, title, ticket, and content type, with the ticket referenced from the request.
  3. A Blob of the bytes to print.

Supported content types for the submitted job are application/pdf and image/png. The Cloud Job Ticket must not include FitToPageTicketItem, PageRangeTicketItem, or ReverseOrderTicketItem for native printing; VendorTicketItem is optional and other ticket fields must be present per the SubmitJobRequest job properties.

Calling submitJob() normally opens a dialog asking the user to confirm printing. Enterprise admins can skip that prompt by listing the extension in the PrintingAPIExtensionsAllowlist policy (referenced on the same API page). Before Chrome 120, submitJob() did not return a promise in Manifest V2; current references return Promise<SubmitJobResponse>.

The response carries SubmitJobStatus and an optional jobId:

SubmitJobStatus Meaning
OK Print job request accepted
USER_REJECTED User declined the confirmation dialog

If status is not OK, jobId is null.

Roll and receipt printing with vendor_ticket_item

Section titled “Roll and receipt printing with vendor_ticket_item”

For continuous (roll) media—common on receipt printers—the request shape matches a standard submitJob() call, but the ticket uses media_size values from the printer’s capabilities. Call getPrinterInfo() and choose a media_size.option where is_continuous_feed is true, then copy its width_microns and height_microns into the ticket (roll printing section).

To control whether the printer cuts the roll, set vendor_ticket_item to an array with one object: id: 'finishings', value 'trim' (cut) or 'none' (tear off). Defaults vary by device; not every printer exposes finishings—look for display_name finishings/11 under vendor_capability in getPrinterInfo(). From Chrome 124 onward, vendor_ticket_item may include any item from the printer’s vendor_capabilities, not only finishings.

JobStatus: tracking PENDING through PRINTED

Section titled “JobStatus: tracking PENDING through PRINTED”

After acceptance, each job moves through JobStatus values:

“PENDING” — Print job is received on Chrome side but was not processed yet.

“IN_PROGRESS” — Print job is sent for printing.

“FAILED” — Print job was interrupted due to some error.

“CANCELED” — Print job was canceled by the user or via API.

“PRINTED” — Print job was printed without any errors.

— Google, JobStatus enum

Use chrome.printing.onJobStatusChanged to react in real time. For explicit polling, getJobStatus(jobId) (Chrome 135+) returns the current JobStatus and throws a runtime error if jobId is unknown. Cancel with cancelJob(jobId) while the job is still PENDING or IN_PROGRESS; Google notes that on fast networks or direct printer connections those states may be too brief for a cancel button to matter (cancelJob example).

jobId always comes from the successful SubmitJobResponse; store it if you need cancel or status queries later.

getPrinters and PrinterStatus: picking a device and spotting faults

Section titled “getPrinters and PrinterStatus: picking a device and spotting faults”

getPrinters() returns installed printers with id, name, description, isDefault, source (USER or POLICY), optional recentlyUsedRank, and uri. Multiple entries may have isDefault true under DefaultPrinterSelection rules. getPrinterInfo(printerId) adds capabilities (CDD format, optional) and live PrinterStatus.

Printer status describes hardware/service state. Many codes still allow the queue to accept jobs; only some block submission:

PrinterStatus Accepts new jobs? Typical meaning
AVAILABLE Yes Ready
OUT_OF_PAPER, OUT_OF_INK, PAPER_JAM, etc. Yes (per docs) Operator action needed but queue open
STOPPED Accepts but does not print Halted device
UNREACHABLE No Cannot reach printer
EXPIRED_CERTIFICATE Accepts but jobs fail TLS cert problem on network printer

The full enum is defined in the PrinterStatus section. Combine status checks with getPrinterInfo() before building tickets so media_size, duplex, and color options match hardware.

chrome.printerProvider: extension-owned printers and PrintError

Section titled “chrome.printerProvider: extension-owned printers and PrintError”

When your extension provides printers to ChromeOS rather than consuming system printers, implement chrome.printerProvider. The print manager uses it to list printers, query capabilities, and dispatch jobs.

The chrome.printerProvider API exposes events used by print manager to query printers controlled by extensions, to query their capabilities and to submit print jobs to these printers.

— Google, chrome.printerProvider

Incoming print jobs use contentType application/pdf or image/pwg-raster, a document Blob, printerId, title, and a print ticket in CJT format (CJT remains valid for ChromeOS printing though deprecated for Google Cloud Print). Your onPrintRequested handler reports completion through PrintError:

PrintError Meaning
OK Success
FAILED General failure
INVALID_TICKET Ticket incompatible with capabilities
INVALID_DATA Corrupt or unsupported document

Declare the printerProvider permission in the manifest.

chrome.printingMetrics: audit data after jobs finish

Section titled “chrome.printingMetrics: audit data after jobs finish”

Extensions with the printingMetrics permission can read structured records for completed jobs via the chrome.printingMetrics API. PrintJobInfo includes times, page count, title, printer details, requested settings (color, copies, duplex, mediaSize), PrintJobSource (EXTENSION, PRINT_PREVIEW, ANDROID_APP, ISOLATED_WEB_APP), and final PrintJobStatus (FAILED, CANCELED, PRINTED). Use this for compliance logging—not for real-time UI, which should rely on onJobStatusChanged or getJobStatus.

Common mistakes when wiring extension print jobs

Section titled “Common mistakes when wiring extension print jobs”
  • Wrong platform — Calling chrome.printing off Chromebook; the API is documented only for ChromeOS devices.
  • Invalid ticket — Including fit-to-page or page-range ticket items native printing ignores, or omitting required ticket fields.
  • MIME mismatch — contentType on the blob and job must align (application/pdf or image/png for submitJob; image/pwg-raster only on the provider side).
  • Ignoring confirmation — Expecting silent printing without allowlist policy; users see USER_REJECTED when they decline.
  • Stale jobId — Reusing IDs after failure or assuming getJobStatus succeeds for canceled jobs that were purged.
  • Roll media — Hard-coding media_size instead of reading is_continuous_feed options from getPrinterInfo().
  1. On a Chromebook, load your extension with the printing permission and confirm chrome.printing.getPrinters() returns the expected devices in the service worker or offscreen document console (chrome.printing reference).
  2. Submit a one-page PDF test job with submitJob(), accept the confirmation dialog, and verify JobStatus reaches PRINTED via onJobStatusChanged or getJobStatus.
  3. If you rely on silent printing, confirm the extension ID appears in the org’s PrintingAPIExtensionsAllowlist policy and that no confirmation appears.
  4. For custom printers, trigger a job from system Print and confirm your printerProvider handler returns OK or the intended PrintError.
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match the official APIs or your experience, email yimasynthetic@gmail.com with the page URL and the exact statement you want clarified.