Cancel a print job
Task 6
5 minutes
Finally, you need to give the user the ability to cancel a print job.
To cancel a print job before completion, you will call cancelJob
with jobI
d as parameter.
Add the following function to printers.js
:
Now you should have a running Chrome extension that can:
- List all available printers.
- Send a print job to a printer.
- Monitor print job status.
- Cancel a print job.
If you want to see a full version of a sample Chrome extension for printing please see this Github repo.