ZPL EAN-13 barcode width

Hi, I have this ZPL code to print a EAN-13 barcode

^BY2^BEN,70,Y,N

^FD8033609249442^FS
Is there a method to manage the barcode width in dots?

Anonymous (not verified)
Hi Daniele,Unfortunately the

Hi Daniele,

Unfortunately the answer is the same across most bar codes.  Just using ZPL in the printer there is no way to set a fixed width. You can use a label creation tool, especially with a fixed data barcode like EAN-13, to manage the size, but not in ZPL directly. 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Daniele Salvucci
Hi Robin,i'm working in a web

Hi Robin,

i'm working in a web contest so i can't use a client-server tool to create my label. Can you suggest me a tool that can be used in a we contest?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Depending on your situation,

Depending on your situation, ZebraDesigner Basic Barcode Label Software | Zebra  is not really a server side application.  You install it on a PC and use it to create an initial label format and make things like your bar code data variable.  Then you export the ZPL and use that as a file in your app. 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Daniele Salvucci
Hi Robin,I tried to use the

Hi Robin,

I tried to use the tool you suggested. The ZPL code is

^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR5,5~SD15^JUS^LRN^CI0^XZ

^XA

^MMT

^PW376

^LL0216

^LS0

^BY2,2,64^FT296,114^BEI,,Y,N

^FD8033609249442^FS

^PQ1,0,1,Y^XZ

You can see that barcode width is managed by the first parameter of ^BY command (Values accepted 1 to 10). So I can't manage the barcode width in dots with this kind of command.

Is there a different way to create a manually-sized EAN 13 barcode?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Daniele Salvucci
Hi,I printed these two labels

IMG_20170925_195257.jpg

Hi,

I printed these two labels with this commands:

Label 1 (1,3 cm):

^XA

^FWN

^FO150,70^BY3

^BY1^BEN,60,Y,N

^FD8033609149442^FS

^XZ

Label 2 (2,6 cm):

^XA

^FWN

^FO150,70^BY3

^BY2^BEN,60,Y,N

^FD8033609149445^FS

^XZ

The only difference between these two labels is the first parameter of ^BY command.

Is there a way to obtain an intermediate width directly with ZPL code?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
^BYw, r, h has three

^BYw, r, h has three parameters. Both w (width) and h (height) parameters specify the number of dots for width and height, while the r (ratio of wider bar to narrow bar) parameter specifies a decimal value between 2.0 to 3.0 (with only one digit number after the decimal is allowed). If we want to adjust the total length (in width) of barcode, we could modify the r parameter from 2.0, 2.1, 2.2, ..., up to 3.0.

Hope this helps.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Daniele Salvucci
Hi Steven,EAN 13 supports

Hi Steven,

EAN 13 supports fixed print ratios, so I can't use the ratio parameter of ^BY command.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
You are right. EAN-13 bar

You are right. EAN-13 bar code only supports fixed ratio. The ratio (r) parameter in ^BY does not work for AEN-13. In this case, we can only use width (w) parameter in ^BY to specify the total width of a bar code.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


jahed ali Shaik
Hello Daniele,Reg : EAN13

Hello Daniele,

Reg : EAN13 barcode width.

I to having the same issue in adjusting the EAN13 width .

Did you find a solution , if yes could you please share the details.

Thanks in advance.

Jahed Ali

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dmitry Prokhorov
Hello Jahed,You can use ^BY

Hello Jahed,

You can use ^BY ZPL command with respective parameters to control a width of your EAN-13 width. It permits you to set a code width from a set of predefined values 1 to 10:

https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf#page=126

Also, you can use parameters of ^BE ZPL command to control a height of your EAN-13 code in dots:

https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf#page=89

With a following ZPL code:

^XA

^FWN

^FO150,70^BY2

^BEN,180,Y,N

^FD8033609149445^FS

^XZ

^XA

^FWN

^FO150,70^BY4

^BEN,30,Y,N

^FD8033609149445^FS

^XZ

I was able to print two labels with EAN-13 barcode of different width and height:

photo_2019-03-17_22-38-40.jpg

Dmitry Prokhorov

Software Engineer, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Ei Khaing
Hello all,I am also getting

Hello all,

I am also getting same issue in adjusting Barcode Label width to 78mm. Could you kindly share the solution if you managed to find solution?

Thanks in advance

Ei Khaing

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dmitry Prokhorov
Hello Ei,Please, see my

Hello Ei,

Please, see my response to Jahed with example labels printed. Seems there is no way to adjust EAN-13 barcode width to some arbitrary value. You can select it from set of specific widths by using ^BY ZPL command:

https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf#page=126

Dmitry Prokhorov

Software Engineer, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments