0
votes

I want to print a Code 128 barcode with a Zebra printer. But I just can't get exactly where I want because the barcode is either too small or too big for the label size of 40x20 mm. Is there anything else I can try besides using the ^BY (Bar Code Field Default) module width and ratio?

^XA^PQ2^LH0,0^FS
^MUM  
^GB40,20,0.1,B^FS
^FO1.5,4
^BY0.2
^BCN,10,N,N
^FD*030493LEJCG002999*^FS
^FO8,15
^A0N,3,3
^FD*030493LEJCG002830*^FS
^MUD
^XZ

Above script gives me a label that looks like this: enter image description here

But when I just decrease the module width to 0.1 (which is the lowest) the barcode becomes too small and may be problematic to scan with a hand scanner: enter image description here

2

2 Answers

1
votes

Code-128 is a fixed-ratio code, so you would appear to have the choice of two sizes. You may be able to solve the problem by using a 300dpi printer in place of a 200.

If you can change the format (and I'm intrigued by the barcode and readable being different values) then you could save a little by printing one number-sequence and one alpha-sequence, as an even count of numerics will be encoded as alphabet C so you'd save one change-alphabet element.

Do you really need the * on each end?

Otherwise, perhaps code 39 (which prints the * if you use the print-interpretation-line option) would suit your purposes better.

0
votes

Another Possibility is to do on the fly code-set changes, Try something like

^XA^PQ2^LH0,0^FS
^MUM  
^GB60,20,0.1,B^FS
^FO1.5,4
^BY0.2
^BCN,10,N,N
^FD>:*>5030493>6LEJCG>5002830>6*^FS
^FO8,15
^A0N,3,3
^FD*030493LEJCG002830*^FS
^MUD
^XZ

This will allow less symbols to encode your data If you can structure content to have all the alpha chars a one end or the other. or (Depending on your firmware) you could use auto ^BCN,10,N,N,N,A