Ngx-scanner: Unable to scan Data matrix on the back of Swedish driverslicenses

Created on 13 Oct 2018  路  8Comments  路  Source: zxing-js/ngx-scanner

Describe the bug
Unable to scan Data matrix

To Reproduce
Steps to reproduce the behavior:
try to scan
image

on demo page (or in you own app) https://zxing-js.github.io/ngx-scanner/

Expected behavior
The value should be outputted

Desktop (please complete the following information):

  • OS: Win 10
  • Browser Chrome
  • Version 69
docs not a bug question

Most helpful comment

Of course: https://github.com/zxing-js/ngx-scanner/wiki/Getting-Started#choosing-what-decoders-to-run

I should've already added that before anyway.

All 8 comments

I'm afraid the DataMatrix reader was disabled on the demos.

image

Was this the expected result?

Yupp, and im able to scan my card in the stackblitz demo aswell. issue may be marked as solved.

Is there anything special i need to do to activate it in my own code?

By default only the QR code decoder comes enabled, there's some options to enable the others, I think the most simple is this one:

<zxing-scanner [formats]="['QR_CODE', 'EAN_13', 'CODE_128', 'DATA_MATRIX']"></zxing-scanner>

As you can see, you can use the formats property to achieve that.

If you want to read more: https://github.com/zxing-js/ngx-scanner/pull/112#issuecomment-403974038

Good luck! 馃嵒

Of course: https://github.com/zxing-js/ngx-scanner/wiki/Getting-Started#choosing-what-decoders-to-run

I should've already added that before anyway.

Thats why I thought it didn't work when I added <zxing-scanner></zxing-scanner> to my app ;)

is there a list of all avalible formats?

Yeah! This feature relies directly on the ZXing's core, so you can find'em here: https://github.com/zxing-js/library/blob/master/src/core/BarcodeFormat.ts

Sweet, you have made my monday :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

odahcam picture odahcam  路  5Comments

fitness23 picture fitness23  路  5Comments

werthdavid picture werthdavid  路  4Comments

tearforfear007 picture tearforfear007  路  6Comments

rastajpa picture rastajpa  路  7Comments