0
votes

I'm using the ZPL - Zebra Programming Language to format a Code 93 barcode ^BA to reside within a label.

I know I can set the default module width using ^BY. My problem is that ^BY1 makes the barcode to small to read and ^BY2 makes it too large for the label.

This is the code:

^FO15,110^BY2,3,35^BAN,35,N^FD001EC0A688E2^FS

I wish I could use decimal values with ^BY but that doesn't seem to be possible.

Some barcodes as Code 128 ^BC have a mode parameter to pack the bar code better based on the data but ^BA doesn't have that.

I saw that some barcodes as QR (^BQ) do have a magnification factor parameter but that's also missing for ^BA.

Are there any other ways to set the width with smaller steps than ^BY?

The label is 38 mm wide and 19 mm tall and the DPI is 203 (8 dots/mm) and the data is always 12 hexadecimal characters [0-9 and A-F].

2

2 Answers

2
votes

^BY does allow decimals in the second parameter (2.0 to 3.0) but that only applies to variable-ratio barcodes and code-93 is fixed-ratio.

The problem is that you need to think in terms of dots. Setting the narrow-bar width to 2 (as in ^BY2) means that the wide bar is then 4 or 6 dots (^BY2,2 or ^BY2,3) so the physical result is that the data content is always going to be (3 bars + 3 spaces)*datalength which translates to a particular number of dots.

The dot pitch is commonly 203dpi but 300dpi are available (you don't say which model you are using.) The barcode width when printed thus depends dirctly onthe amount of data and barcode type you are using. It's not like laser-printers where 1200dpi is common - the dots are six times bigger.

So - you'd need to say how wide you can handle, which model you are using and what your data characteristics are (your sample shows 12-character hexadecimal - are you using full ASCII or could you adjust and use numeric-only?) Are you stuck on code-93 or will some other encoding be OK?

2
votes

Have you tried ^BY2,2? That will use a smaller ratio, but larger base.

If you want a more detailed answer you will need to provide: DPI, print width and max amount of data you are trying to encode.