How to print raw Zebra EPL commands from Javascript

The Eltron Programming Language 2 (EPL2) is a robust text (ASCII) based command language used to control most Eltron brand Zebra printer models. EPL2 takes advantage of the intelligent features built into the printer to reduce programming overhead and minimize data transmission time. EPL is one of command printer languages from Zebra Technologies that is supported by their printers as well as by others thermal printer manufactures like SATO, Datamax, Intermec, Godex (by providing EPL firmware emulation software). Zebra printers are widely used in POS (Point Of Sales or Point of Services) scenarios like retail, banking, hospitality, manufacturing, healthcare and more!

The main advantage of using raw Zebra EPL commands for printing instead of using the built-in browser javascript printing (window.print();) is that the printing performance will be way faster; a factor that is key in the aforementioned scenarios. No matter which Web Platform/Framework you use (ASP.NET, PHP, Django, Ruby On Rails (RoR), Express.js, AngularJS/SPA, etc.), you'll be able to use raw printing feature with the help of our JSPrintManager solution that was specially designed for this kind of printing needs.

In this walkthrough, you'll learn how to print raw EPL commands from Javascript directly to the client printer without displaying a print dialog at all. You'll be able to print Zebra EPL commands to the Default client printer as well as to any other installed printer at the client machine. This solution works with any popular browser like Chrome, Firefox, IE/Edge & Safari on Windows, Linux, Raspberry Pi and Mac systems!

The Zebra EPL commands that we'll use in this article will print out a simple barcode label that will look like this:

A Sample Barcode Label printed from Javascript and created by using Zebra EPL commands


A Sample Barcode Label printed from Javascript and created by using Zebra EPL commands

Follow up these steps

HTML Code

  

Print Zebra EPL commands from Javascript


or.



Script References

Script Code

   

NOTE You can also print directly to any LPT Parallel Port, RS232 Serial Port or IP/Ethernet Printer although these scenarios have not been considered in this article for simplicity. For further details on those scenarios, please contact our tech support.