python-barcode icon indicating copy to clipboard operation
python-barcode copied to clipboard

UPC/UPCA final output doesn't include guard bars

Open logikonabstractions opened this issue 3 years ago • 1 comments

I'm being told (not a barcode format specialist) that the standard presentation for a UPC/UPCA code should look like this:

image

If I generate this barcode using the following code however, I get this:

image

Issues:

Added "F" at the end?

Any way to turn this off?

Guardbars not displayed

As I seem to understand, the standard/typical presentation for those code should include guardbars. I tried adding the "guardbars" keywords but it seems the UPC class doesn't accept that argument.

Code:

python-barcode create 686254053919 upc

Also generated as part of a server-side rendering, with same result:

UPCA(str(value["code"]), writer=SVGWriter(), guardbars=True).write(file)

logikonabstractions avatar Oct 26 '22 13:10 logikonabstractions

I tried adding the "guardbars" keywords but it seems the UPC class doesn't accept that argument.

Indeed, it's not implemented for that class. Patches welcome.

Added "F" at the end?

This still scans correctly right, it merely should be excluded from the text, right?

WhyNotHugo avatar Nov 04 '22 11:11 WhyNotHugo