Reputation: 11
I am developing chrome extension using printerProvider APIs to print a webpage loaded in the browser.
I have added a new printer using onGetPrintersRequested() & onGetCapabilityRequested() APIs in my extension. I have not installed printer drivers of this printer on my local system.
My understanding from reading API documentation and other references is, using onPrintRequested() and providing printJob info, job (contents of web page) can be sent to the printer I added in my extension.
My question is, how does job reach the printer? Should I write some code to actually send the job to printer? OR is it automatically handled by the chrome APIs OR soes it use any default driver? Basically my question is, how is printing handled by chrome extension if it is not using any printer drivers or cloud ready printers?
Thanks in advance.
Upvotes: 1
Views: 1622
Reputation: 20438
You need to handle the printing yourself. The onPrintRequested event gives you data about the print request. You should then call the result callback with the status. To communicate with the printer, there are a number of app APIs. If you need to communicate with a printer from an extension, you will need to use a companion app and messaging.
Upvotes: 1