Recent

Author Topic: ZPL printing  (Read 3183 times)

Petrus Vorster

  • Full Member
  • ***
  • Posts: 245
ZPL printing
« on: August 12, 2025, 10:38:08 am »
Hi All

I have come across a need for ZPL printing to barcode printers.
I can easily generate the correct Tracking numbers, and create labels with  Code128 Barcodes using the Windows drivers of the printer, bit there is a loss of about 3 seconds per label compared to direct printing.

That equates to almost 8 hours on say 10 000 sequential labels.
(on a Zebra industrial printer).

I am clueless on how to do flow control and set the label info via the ZPL language, whether you can do ZPL via a USB or whether it has to be a serial cable. (The all have serial and USB interfaces.
I have  small ZPL compatible printers available for testing small batches.

If anyone has worked with this and may have some practical examples, please be so kind to share.

Regards, Peter

ccrause

  • Hero Member
  • *****
  • Posts: 1117
Re: ZPL printing
« Reply #1 on: August 13, 2025, 02:51:58 pm »
Sending the ZPL commands over serial seems to be relatively easy: https://supportcommunity.zebra.com/s/article/105SL-Plus-and-Xi-Printer-Series-Communicating-to-printer-via-serial-port-connection?language=en_US

Not sure about using the USB interface, you probably have to use the provided driver.

If you have an existing file with the ZPL label information, you should be able to read it as text and dump the text to the serial connection using one of several serial options.   Synaser and TLazSerial are popular options (I typically use the Serial unit, but most people seem to prefer a higher level wrapper).

If you need to generate a label/document to print, then you can generate the code yourself using the ZPL reference or a report generator such as Fast Reports or maybe fortes4lazarus.

jamie

  • Hero Member
  • *****
  • Posts: 7768
Re: ZPL printing
« Reply #2 on: August 14, 2025, 02:40:22 am »
10K prints?

After looking at that printer, I don't think it would last that long! :o

Jamie
The only true wisdom is knowing you know nothing

Petrus Vorster

  • Full Member
  • ***
  • Posts: 245
Re: ZPL printing
« Reply #3 on: August 14, 2025, 10:08:13 am »
Thank you

Those industrial Zebra printers goes a long distance.
We had a national contract for software (long story) and the contracted software had run those printers in excess of 200 000 labels + each.

Each labels carries a different barcode. We have a few ZT510 printers available.

If we can do that in-house it would save a lot of money.
I can print bulk on the windows drivers, and i my humble opinion, my labels looks better than those on the direct stream.

But government red-tape is a bastard at best.

-Thanks mates. -Peter

jamie

  • Hero Member
  • *****
  • Posts: 7768
Re: ZPL printing
« Reply #4 on: August 14, 2025, 12:06:36 pm »
Did you try the barcode unit and just simply try a standard image print of it to the printer instead of using the printers fonts?
Jamie
The only true wisdom is knowing you know nothing

jesusr

  • Sr. Member
  • ****
  • Posts: 499
Re: ZPL printing
« Reply #5 on: August 14, 2025, 06:05:36 pm »
Hi All

I have come across a need for ZPL printing to barcode printers.
I can easily generate the correct Tracking numbers, and create labels with  Code128 Barcodes using the Windows drivers of the printer, bit there is a loss of about 3 seconds per label compared to direct printing.

That equates to almost 8 hours on say 10 000 sequential labels.
(on a Zebra industrial printer).

I am clueless on how to do flow control and set the label info via the ZPL language, whether you can do ZPL via a USB or whether it has to be a serial cable. (The all have serial and USB interfaces.
I have  small ZPL compatible printers available for testing small batches.

If anyone has worked with this and may have some practical examples, please be so kind to share.

Regards, Peter

There is one example in components/printers/samples/rawmode

See the PrintZebraSample method.

 

TinyPortal © 2005-2018