Use the chrome.printing API to send print jobs to printers installed on Chromebook.
Use the chrome.printing API to send print jobs to printers installed on Chromebook. * available since Chrome 81 * https://developer.chrome.com/extensions/printing
(cancel-job job-id)
Cancels previously submitted job.
|job-id| - The id of the print job to cancel. This should be the same id received in a 'SubmitJobResponse'.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/printing#method-cancelJob.
Cancels previously submitted job. |job-id| - The id of the print job to cancel. This should be the same id received in a 'SubmitJobResponse'. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/printing#method-cancelJob.
(get-max-get-printer-info-calls-per-minute)
The maximum number of times that 'getPrinterInfo' can be called per minute.
https://developer.chrome.com/extensions/printing#property-MAX_GET_PRINTER_INFO_CALLS_PER_MINUTE.
The maximum number of times that 'getPrinterInfo' can be called per minute. https://developer.chrome.com/extensions/printing#property-MAX_GET_PRINTER_INFO_CALLS_PER_MINUTE.
(get-max-submit-job-calls-per-minute)
The maximum number of times that 'submitJob' can be called per minute.
https://developer.chrome.com/extensions/printing#property-MAX_SUBMIT_JOB_CALLS_PER_MINUTE.
The maximum number of times that 'submitJob' can be called per minute. https://developer.chrome.com/extensions/printing#property-MAX_SUBMIT_JOB_CALLS_PER_MINUTE.
(get-printer-info printer-id)
Returns the status and capabilities of the printer in CDD format. This call will fail with a runtime error if no printers with given id are installed.
|printer-id| - https://developer.chrome.com/extensions/printing#property-getPrinterInfo-printerId.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [response] where:
|response| - https://developer.chrome.com/extensions/printing#property-callback-response.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/printing#method-getPrinterInfo.
Returns the status and capabilities of the printer in CDD format. This call will fail with a runtime error if no printers with given id are installed. |printer-id| - https://developer.chrome.com/extensions/printing#property-getPrinterInfo-printerId. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [response] where: |response| - https://developer.chrome.com/extensions/printing#property-callback-response. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/printing#method-getPrinterInfo.
(get-printers)
Returns the list of available printers on the device. This includes manually added, enterprise and discovered printers.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [printers] where:
|printers| - https://developer.chrome.com/extensions/printing#property-callback-printers.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/printing#method-getPrinters.
Returns the list of available printers on the device. This includes manually added, enterprise and discovered printers. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [printers] where: |printers| - https://developer.chrome.com/extensions/printing#property-callback-printers. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/printing#method-getPrinters.
(submit-job request)
Submits the job for print. If the extension is not listed in PrintingAPIExtensionsWhitelist policy, the user will be prompted to accept the print job.
|request| - https://developer.chrome.com/extensions/printing#property-submitJob-request.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [response] where:
|response| - https://developer.chrome.com/extensions/printing#property-callback-response.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/printing#method-submitJob.
Submits the job for print. If the extension is not listed in PrintingAPIExtensionsWhitelist policy, the user will be prompted to accept the print job. |request| - https://developer.chrome.com/extensions/printing#property-submitJob-request. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [response] where: |response| - https://developer.chrome.com/extensions/printing#property-callback-response. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/printing#method-submitJob.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.printing namespace.
Taps all valid non-deprecated events in chromex.ext.printing namespace.
(tap-on-job-status-changed-events channel & args)
Event fired when the status of the job is changed. This is only fired for the jobs created by this extension.
Events will be put on the |channel| with signature [::on-job-status-changed [job-id status]] where:
|job-id| - https://developer.chrome.com/extensions/printing#property-onJobStatusChanged-jobId. |status| - https://developer.chrome.com/extensions/printing#property-onJobStatusChanged-status.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/printing#event-onJobStatusChanged.
Event fired when the status of the job is changed. This is only fired for the jobs created by this extension. Events will be put on the |channel| with signature [::on-job-status-changed [job-id status]] where: |job-id| - https://developer.chrome.com/extensions/printing#property-onJobStatusChanged-jobId. |status| - https://developer.chrome.com/extensions/printing#property-onJobStatusChanged-status. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/printing#event-onJobStatusChanged.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close