Printer communication API

Currently communication between the browser and printers happens through an intermediate window in the browser that is very rigid.

It’s currently not possible to configure from the webpage which printer we want to print from, set any other configuration like color, size of the paper, tray id, recto verso settings and more…

An API that could connect and communicate raw information to printers connected to the computer through a web page would enable numerous use cases that are currently not possible without having to install a separate client on the computer.

What do you all think?

1 Like

I made some notes a while back on the same topic.

Web Print API

This would be really good to have, as we could then have more relaxed permissions around printing.

Needs to support all types of printers including large format, thermal, label and with cutting etc.

Needs to support the printer sending back events and have a large number of possible events it could send back (tray open, no paper, run out of cyan etc)

Needs to support all the possible color schemes for various printers.

Needs to be able to generate an image of each “page” of what is about to be printed for preview purposes.

Manufacturers need clear example code on how to implement the spec and there needs to be the ability to produce plugable polyfills (I.e. device drivers) that you can add in the browser (either delivered by the browser, or added by the developer client side).

Needs to support printers connected by different methods (local network, bluetooth etc)

Needs to be accessible within a service worker for remote printing.

Need to ensure it’s easy to connect up-to server to push print jobs from a server.

SSL certificates for local printers are a PITA… need a better solution. Too hard for normal users to administer.