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

Cannot use other formats than the default one

Open Motassem-MK opened this issue 8 years ago • 3 comments

Hi, I'm trying to use the Codabar format, this is my code: <ngx-barcode [bc-value]="'something'" [bc-display-value]="true" [bc-format]="'codabar'"></ngx-barcode>

I got this error:

ERROR TypeError: api.options(...)[options.format] is not a function

(same for most other formats)

Am I doing it wrong?

Motassem-MK avatar Dec 16 '17 09:12 Motassem-MK

Confirmed. The only formats that work are CODE128, CODE39, and MSI. All others throw an error.

drullo avatar Mar 20 '18 18:03 drullo

Just try it with EAN8, EAN13 seems to be ok. codabar too. For me the problem was that i was setting format as 'EAN-13' instead of 'EAN13'

yesiman avatar Apr 04 '18 08:04 yesiman

Before using a specific barcode format look for its specification. In case of ITF-14 it must be exactly 14 digits long. Otherwise it won't show.

kwkr avatar Oct 18 '18 15:10 kwkr