# Barcode width mismatch

**URL:** <https://forum.inductiveautomation.com/t/barcode-width-mismatch/96948>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [October 8, 2024, 7:31am UTC](https://forum.inductiveautomation.com/t/barcode-width-mismatch/96948 "2024-10-08T07:31:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [October 8, 2024, 7:31am UTC](https://forum.inductiveautomation.com/t/barcode-width-mismatch/96948/1 "2024-10-08T07:31:16Z")

</div>

Hi,

I have configured a text binding for two barcodes in Ignition Vision. However, I notice a difference in their widths, and I would like to ensure they have the same width, regardless of the text content. I have attached a snapshot of the output and the configuration.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/5/8561420ee77ed287bde7914ed7d74eaa2ec45609.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/6/76fe6a1140930df79ff57b274b2633eabd7fbb5c.png)  
Could you please assist me with this issue?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 8, 2024, 11:43am UTC](https://forum.inductiveautomation.com/t/barcode-width-mismatch/96948/2 "2024-10-08T11:43:01Z")

</div>

> [@Dharani\_T](#):
>
> and I would like to ensure they have the same width, regardless of the text content

In the same way your text is bigger with more characters, conventional barcodes get bigger with more characters. You risk having unreadable barcodes if you go this path.

_ **Why** _ do you want this?

---

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [October 9, 2024, 9:35am UTC](https://forum.inductiveautomation.com/t/barcode-width-mismatch/96948/3 "2024-10-09T09:35:28Z")

</div>

If this poses a risk, I’ll leave it as is. I was considering maintaining a uniform width since it will be pasted to a box.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [October 9, 2024, 11:19am UTC](https://forum.inductiveautomation.com/t/barcode-width-mismatch/96948/4 "2024-10-09T11:19:10Z")

</div>

If it's just a number, you could always zero pad it on the left to make them all the same size, but if it's free-form text I don't know if there's a way (are spaces valid characters in a barcode? If so, could pad it on left with spaces).

Problem becomes the device/system scanning the codes then that they strip off the excess 0's or spaces.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 9, 2024, 12:24pm UTC](https://forum.inductiveautomation.com/t/barcode-width-mismatch/96948/5 "2024-10-09T12:24:42Z")

</div>

> [@michael.flagler](#):
>
> are spaces valid characters in a barcode?

Depends on the code, but yes for Code128 that is shown.
