6

I am using Zebra GT800 label printer with a label role size with 2.5' * 1.75'. I'm struggling to get it resize to the label within, using ZPL commands. I tried with several values in bold text which I read in the user guide of ZPL, but no success.

When values BY2 is used, what it happens is bar-code is getting out of the margins of the label. When I uses value BY1 it is too small to read though. Below with the ZPL Commands used.

^XA^FO150,100^**BY1**^BC,100,Y,N,N^FD00V11636000032562050^FS^XZ 

^XA^FO150,100^**BY2**^BC,100,Y,N,N^FD00V11636000032562050^FS^XZ 
halfer
  • 19,824
  • 17
  • 99
  • 186
MRT
  • 61
  • 1
  • 1
  • 3

2 Answers2

17

What I would suggest is the following:

  1. Continue using ^BY2 to set the module width for the barcode so that the scanners in question can read them.

  2. For your ^BC command, set the 6th parameter (the "mode" parameter) to A to set the mode of the Code 128 barcode to "Automatic." Doing this will tell the printer to analyze the data being encoded and will determine the best packing method. This can help automatically compress the printed barcode if the data is compressable (four or more numeric digits in a row will cause a shift to subset C which will help you here).

Example:

^XA^FO150,100^BY2^BC,100,Y,N,N,A^FD00V11636000032562050^FS^XZ

Source:

Page 81 of this ZPL Programming Guide

gmacster
  • 404
  • 3
  • 11
  • 4
    @RuwanPerera you should accept this as the correct answer. – Elton Saunders Nov 21 '14 at 14:42
  • It did not worked to me http://labelary.com/viewer.html?density=8&width=2.5&height=1.75&units=inches&index=0&zpl=%5EXA%5EFO50%2C100%5EBY2%5EBC%2C100%2CY%2CN%2CN%2CA%5EFD00V11636000000000000000032562050%5EFS%5EXZ%0A%0A%5EXA%5EFO50%2C100%5EBY2%5EBC%2C100%2CY%2CN%2CN%5EFD00V11636000032562050%5EFS%5EXZ%20%0A%0A%5EXA%5EFO150%2C100%5EBY1%5EBC%2C100%2CY%2CN%2CN%5EFD00V11636000032562050%5EFS%5EXZ%20%0A . Am I missing something ? – user3079364 Nov 20 '17 at 19:12
-1

Try this:

^XA^PRA^BY1,2^LH000,000^PQ1
^FO115,100^B3N,,075,N^FD00V11636000032562050^FS
^FO075,225^A0N,050,040^FD00V11636000032562050^FS
^XZ
Majid Hajibaba
  • 3,105
  • 6
  • 23
  • 55
IT Guy
  • 1