kciter / react-barcode

A <Barcode/> component for use with React.
http://kciter.github.io/react-barcode/
ISC License
396 stars 72 forks source link

Add support for CODE128 (GS1-128/EAN-128) barcode format #97

Closed mziyut closed 3 months ago

mziyut commented 3 months ago

What

This pull request is a change to make the option ean128 available for CODE128.

Define ean128: true to allow CODE128 to be encoded as GS1-128/EAN-128. The default value of ean128 is defined to be false and does not affect existing processing.

Ref

ean128 option for CODE128

Enable encoding CODE128 as GS1-128/EAN-128.

JsBarcode("#barcode", "12345678", {
  format: "CODE128C",
  ean128: true
});

CODE128 - lindell/JsBarcode Wiki https://github.com/lindell/JsBarcode/wiki/CODE128

kciter commented 3 months ago

Thank you. I've published to 1.5.2.