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 frappe.cloud but the setup requirements were not met on the bench. After contacting frappe.cloud 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.
Frappe.cloud 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?
Thanks,
Dom
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 example.frappe.cloud (however any site running on that server at Frappe could then access your printers).
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.
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.
From what I’ve seen, adding a Network Printer in ERPNext only registers the printer through CUPS—it doesn’t automatically replace the standard browser print dialog. In most ERPNext versions, there isn’t a built-in “Print Directly to Network Printer” button available in the standard print formats.
Direct printing typically requires a server-side print flow where ERPNext generates the PDF and sends it to CUPS using pycups. If that workflow isn’t implemented in your version or custom app, ERPNext will continue using the browser’s print dialog.
A few things you can check:
Verify that CUPS can print a test page to the printer outside of ERPNext.
Confirm pycups is installed and detected on the bench.
Check the server logs (bench start or production logs) for any print-related errors when attempting to print.
Make sure the printer is marked as enabled/default in the ERPNext Printer doctype.
If your goal is silent printing (e.g., POS receipts or warehouse labels), many users implement a small custom server-side method or use a local print agent that listens for print jobs and forwards them directly to CUPS. That approach avoids the browser print dialog and tends to be more reliable for receipt printers and barcode printers.
It would definitely be helpful if the documentation clarified what the current Network Printer feature supports versus what still requires custom implementation.
This might be by design. In order to print to the network printer you’ll need customization. This can be scripts that send jobs to printers when the user hits submit or custom buttons created by you.
We are soon an app “Print Plus” to help with this very specific requirement. I will post the GitHub repo here, once it’s usable.
For new ones, wondering same, direct print feature will be live on erpdesktop.com. You will get direct print button and on clicking it, it triggers erpdesktop direct print feature which handles printing without much hassle.