JsBarcode icon indicating copy to clipboard operation
JsBarcode copied to clipboard

Adding flat option to EAN13 format not working when define the value option in the HTML element

Open asoneji opened this issue 7 years ago • 3 comments

Adding flat option to EAN13 format not working when define the value option in the HTML element.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<br />Barcode1:
<svg id="barcode1"></svg>
<br /><br />Barcode2:
<svg class="barcode" jsbarcode-format="EAN13" jsbarcode-flat=true jsbarcode-value="012345678902"></svg>
<br /><br />Barcode3:
<svg class="barcode" jsbarcode-format="EAN13" flat=true jsbarcode-value="012345678903"></svg>
<br /><br />Barcode4:
<svg class="barcode" jsbarcode-format="EAN13" jsbarcode-flat="true" jsbarcode-value="012345678904"></svg>
</body>
<script src="JsBarcode.all.js"> </script>
<script>
  JsBarcode("#barcode1", "012345678901", {
    format: "ean13",
    flat: true
  });
  JsBarcode(".barcode").init();
</script>
</html>

screen shot 2017-03-31 at 4 31 51 pm

asoneji avatar Mar 31 '17 23:03 asoneji

I will fix this.

Currently I have to manually add the property to work for HTML rendering which seems not to be done for EAN13´s flat option.

This will be fixed with https://github.com/lindell/JsBarcode/pull/107. But I want to wait for some other backwards compatibility breaking change to merge this in (and increase the version to 4). But I might do this earlier than previously thought.

lindell avatar Apr 03 '17 16:04 lindell

Thanks!

asoneji avatar Apr 03 '17 22:04 asoneji

Any change on this?

zorgoz avatar Sep 02 '19 07:09 zorgoz