Printing label from browser using BrowserPrint-Zebra.1.0.216

// Expert user has replied.
J Jonas Groenbek 3 years 7 months ago
136 1 0

So, I have designed a label and exported it to my printer which is a ZD410. I can succesfully print the label with it's keyboard inputs from Zebra Utilities - Direct Communication with the following command:
LABEL.ZPL^XA
^XFE:LABEL.ZPL^FS
^FN11^FD343434343434^FS
^FN12^FD012^FS
^FN13^FD345,-^FS
^FN14^FDW32 L30^FS
^FN15^FD000213^FS
^XZ
However when sending it with the BrowserPrint library, the printers data indicator flashes briefly but it does not print anything. The response code from the ZPL payload returns a 200.
zebraPrinter
.isPrinterReady()
.then(() => {
let zpl =
'LABEL.ZPL^XA\n' +
'^XFE:LABEL.ZPL^FS\n' +
'^FN11^FD343434343434^FS\n' +
'^FN12^FD012^FS\n' +
'^FN13^FD345,-^FS\n' +
'^FN14^FDW32 L30^FS\n' +
'^FN15^FD000213^FS\n' +
'^XZ\n'
zebraPrinter.send(zpl)
})
.catch(() => {
console.error('printer is not ready')
})
I have also tried
let zpl = 'LABEL.ZPL^XA ^XFE:LABEL.ZPL^FS ^FN11^FD"343434343434"^FS ^FN12^FD012^FS ^FN13^FD345,-^FS ^FN14^FDW32 L30^FS ^FN15^FD000213^FS ^XZ '
I am not sure how to resolve this, since I am runnig out of ways to narrow down the problem.

Please Register or Login to post a reply

1 Replies

S Steven Si

It's incorrect to put the filename (LABEL.ZPL) of the stored format at the beginning of the ZPL string. Since you have already had the LABEL.ZPL downloaded to the printer's E: drive, you only need to send the following ZPL recall format to the printer via Browser Print. Please add \r there, as \r\n indicates the end of a ZPL statement. Hope this helps.

let zpl =
'^XA\r\n' +
'^XFE:LABEL.ZPL^FS\r\n' +
'^FN11^FD343434343434^FS\r\n' +
'^FN12^FD012^FS\r\n' +
'^FN13^FD345,-^FS\r\n' +
'^FN14^FDW32 L30^FS\r\n' +
'^FN15^FD000213^FS\r\n' +
'^XZ\r\n' 

CONTACT
Can’t find what you’re looking for?