I’m looking to move from an existing database web app,which uses php/JS/SQL, to ERPNext which is going well but I’,unsure where to start with label printing directly to Zebra printers.
Currently this is achieved with no locally installed devices drivers or QZ tray middle apps required on the users’ device.
The information is taken from the db record the user is accessing via JS, and passed to a php procedure, which sends the ZPL label information via IP address to the printer. All on a simple button press and works well.
(Admittedly no error handling or user feedback but the user is usually nearby to see if the labels have printed).
I’ve searched on the forum and tried various bits of custom formats for Zebra ZPL printing.
I want to continue to not have to install additional software on end user devices, so no solutions with drivers or QZ software are going to work.
What is the best way to go about this?
Do I need to install the Zebra printers on ERPNext? Then setup something via raw printing?
Do I create a server side script (API looks best?) from which I can pass variables from the record being viewed to the script and send to the Zebra printer? If so how do I use a button to activate the server script?
Just starting out in python, so all very new to me. Also starting out with ERPNext and trying to get my head around the whole setup.
Any info or suggestions gratefully received.
Thanks for how to active the server script, couldn’t easily find it in the docs.
If I remember correctly JS can’t open the required sockets, a security feature by design to prevent anything nefarious client side being executed on the server. That’s why I was looking to use a server script instead.
Out of curiousity do you know why/how the network print feature is meant to work? I’ve sent up a network printer on my local install but when I try to print ERPNext default to the browser print manager, and also the report looks nothing like the format in ERPNext’s Print Preview.