wonsikin / react-native-barcode-builder

Component for generating barcode in react native app
Other
175 stars 116 forks source link

EAN13 encoder doesn't work ('undefined is not an object when evaluating binary.length') #4

Closed kiddi closed 7 years ago

kiddi commented 7 years ago

Trying to use the library to create EAN13 barcodes, but run into:

undefined is not an object when evaluating binary.length

This doesn't happen when I use a different barcode type (Code128 for example), but I think it's the for loop in drawSvgBarCode() that doesn't work with EAN13

wonsikin commented 7 years ago

@kiddi You can add flat property like the following:

  <Barcode value="1234567890128" format="EAN13" flat />

This will generate a barcode like the following picture: image

But if you want to generate a barcode like bellow: image

I will say sorry.

If you can help me to improve this repository, I will appreciate it.

kiddi commented 7 years ago

Thanks for the tip, I'll see if I can make it better :)

KonstantinZhukovskij commented 2 years ago

any news here?