Allows to print ZPL to a network connected Zebra printer.
NOTE: This is an extension useful for developers who want to simply print ZPL labels directly from their web apps.
Most Zebra Printers have a HTTP POST endpoint through which ZPL can be directly printed without the need for an installed driver, print dialogs popping up or other locally installed software.
Unfortunately those printers don't set any CORS headers which makes it impossible to use this HTTP endpoint in modern browser-based apps.
This extension circumvents this issue.
In your web app you can now directly print to Zebra printers by using window.postMessage():
window.postMessage({
type: "zebra_print_label",
zpl: "^XA^PW400^LL200^FO20,20^A0N,30,30^FDThis is a TEST^FS^XZ",
url: "http://192.168.37.36/pstprnt";
}, "*");
The Zebra Printing extension will listen to those messages and print the zpl to the url.
type: The extension will only pick up messages where the type is zebra_print_label
zpl: The ZPL string to be printed
url: The URL of the printer
The extension will also post a message to the web page upon loading. This way in your web app you can check if the extension is installed:
window.addEventListener("message", function (event) {
if (!event.data.ZebraPrintingVersion) {
return;
}
// extension installed, enable print button or whatever...
console.log(event.data);
});
The event will contain two fields:
ZebraPrintingExtensionId: The extension ID (ndikjdigobmbieacjcgomahigeiobhbo)
ZebraPrintingVersion: The version number of the installed extension
Latest reviews
- (2023-06-25) Ilmi Nur Azis Aqli Mubarok: This awsome extension makes my life easier, thank you very much!
- (2022-12-30) Pawel Suwala: Absolutely brilliant workaround for printing directly from the browser. Works as advertised. I'm using it every day - thank you!
- (2020-10-06) Maarten Wolzak: Works as advertised. Perfect to start learning ZPL! Please be aware that this plugin enables you to make your printer-setup insecure and sensitive to Man-In-The-Middle attacks from hackers. I advise you to never use this plugin in a production environment. Instead: load a TLS certificate to your printer to enable HTTPS communication! But again: This plugin is a real help!
Latest issues
- (2023-09-26, v:1.2) James Iovine (Jimmy): Throwing serialization error
dropping postMessage.. deserialize threw error. Works fine inside your extension but where do i apply it in my web app? - (2023-05-09, v:1.2) Alifia Syalsabila: Extension status
Hello, is it possible to detect if this extension is installed in my browser from my react js app ? - (2022-03-02, v:1.2) Jeffery Brown: Doesn't Print or Anything Else
Doesn't Print or Anything Else. - (2022-02-17, v:1.2) DH SOCKS: Zebra for macbook
hello, i have a zebra printer, how do i use Zebra Printing on my apple macbook? - (2021-07-06, v:1.2) Haresh Maheshwari: PDF printing using Zebra Printing
Hi, Can we print PDF file using your application please advise. If yes please share steps. - (2020-07-21, v:1.2) Bardo Nayar: INSTALACION
COMO HACER LA INSTALACION? - (2020-03-30, v:1.1) Isaac GarcĂa Peveri: Starting the emulation
Hi. How to start again the emulator after closing chrome? Thankx. - (2020-01-16, v:1.1) Toni Patoni: printer zebra
susah ngak bisa ngeprin - (2019-11-20, v:1.1) Celine Weenk: printen via zebra
Beste, Hoe kan ik nu printen met een Zebra printer vanaf mijn Chrome device? Ik heb de extentie gedownload, hoe nu verder?