Network Printer / Print Server in ERPNext

I stumbled on the “Network Printer / Print Server” functionality in ERPNext accidentally. This uses CUPS, which is an Apple open-source project (IPP) that comes installed with every Mac. So, I assumed, that after setting up a Network Printer, I could “natively” print on a printer without the PDF preview and printer selection that torments users of web apps.

I tried setting this up on but the setup requirements were not met on the bench. After contacting support, I got the following response by support:

Pycups will now be installed on all benches on Frappe Cloud. We’ve updated your existing benches, so no action is needed from your end. support is awesome!

After opening port 631 on our firewall, I was able to discover my network printer and I saved it.

But now comes the question: how do I actually print on my Network Printer from within ERPNext / Frappe? I was assuming that there is a “Network Print” button or something of that sort in the print formats.

Anyone used this before who can shed some light, and so we can improve the docs here?


PS: exposing your CUPS print server on port 631 for the whole world is not a good idea. Currently, there is no way to password-authenticate, so you would have to set up your firewall to only let through a request from your frappe server. You can also do this on Frappe cloud by finding out what IP address is behind your domain name (however any site running on that server at Frappe could then access your printers).


I have been looking for this for a long time. My attempts were not successful.

Hi, any update on this? There is still no Network Print button or something of that sort? What was the solution you used @dominik?

I was looking for this too. I don’t think this is possible through the UI.
Printing to a network printer/print server seems to be possible via API though. Through the API endpoint /api/method/frappe.utils.print_format.print_by_server.
Three parameters are needed: doctype, name and printer_setting (which is the name given to your network server when adding it to ERPNext).


@daanl I’m rying to get Network Printing working, where did you find the API info and requirements/syntax? I’ve been searching it and not been able to find it.


Hi @pmjd,

I found this by combing through the source code.
If you would like to learn more about this, you can find the implementation here.

Does this help?

Kind regards,

1 Like

You can add a custom button in the UI using Client Script and call the relevant API.

Thank you, hopefully gets me a step closer

Can you tell me how I can call the API via a Client Script, I’m looking through the docs but can’t find how to set this up. Attempts so far generate lots of errors when the DocType loads.

See here: Add a Custom Button

You can add a custom button which can perform a function. You can make it call the API using

1 Like

Thank you