Skip to content

Wrong SVG generation for EAN13 #231

@ildarworld

Description

@ildarworld

Don't know, is that a border case, but package generates wrong image for '5032783267860' in EAN13.
its generate barcode for '5032783267863'.
Generated file attached:

5032783267860

To reproduce the issue it just use following.

  • macOS Sonoma 14.5
  • chip Apple M1
  • python-barcode 0.15.1
  • python version 3.11.9
import barcode
from barcode.writer import SVGWriter

barcoder = barcode.get_barcode_class('EAN13')
writer = SVGWriter()
barcode_image = barcoder('5032783267860', writer=writer)
barcode_image.save('~/5032783267860.svg')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions