If a printer does not have any Ethernet or Wifi connection it's not possible to print directly from other machine in the local network. This flask app creates a webeserver that can accepts and prints documents. The webserver is accessible from any machine on the LAN, thus document can be printed on the isolated printer directly from any machine on the LAN.
- Clone this repo in a computer where the printer is locally connected via USB.
- Check the full name of the printer with
lpstat -p -d
and modifyweb_printer.py
file with the name. - Install flask and run the server with
python web_printer.py
or using gunicorn withgunicorn -w 4 'web_printer:app' -b '0.0.0.0:8080'
- Go to the IP address of the host machine with port
8080
(or whatever you provided), the webserver should be available there. For example, if the machine IP is192.168.31.111
, then the webserver is accessible athttp://192.168.31.111:8080/
. You can submit print jobs using this web-page.