EAN-13 bar code with an additional 2 or 5 characters

291 views
Skip to first unread message

Dr Egor

unread,
Jan 26, 2017, 8:20:01 AM1/26/17
to zxing
Hi!
Please tell me how to add the ability to read the EAN-13 as 13+2 or 13+5?
ean-13_4820020830281_03.jpg

Lachezar Dobrev

unread,
Feb 1, 2017, 12:20:38 PM2/1/17
to Dr Egor, zxing
ZXing supports decoding the EAN extensions.
When such an extension is found it is returned as a
ResultMetadataType.UPC_EAN_EXTENSION.
However because the extension is optional ZXing will return the base
EAN even if it fails to see the extension (which happens quite often).
If you wish to force ZXing to require an EAN extension you can supply
the DecodeHintType.ALLOWED_EAN_EXTENSIONS with an integer array
containing 2, 5 or both depending on your case.


You can even do this with Web Site Integration (although you'll need
to parse the meta data manually):

Request:
http://zxing.appspot.com/scan?SCAN_FORMATS=UPC_A,EAN_13&ALLOWED_EAN_EXTENSIONS=2&ret=http://my-site.com/{CODE}/{META}
(remember to perform an URL escape for the "ret" parameter)

Result:
http://my-site.com/4820020830281/%7BISSUE_NUMBER%3D3%2C+POSSIBLE_COUNTRY%3DUA%2C+UPC_EAN_EXTENSION%3D03%7D
The META part is URL Encoded: {ISSUE_NUMBER=3, POSSIBLE_COUNTRY=UA,
UPC_EAN_EXTENSION=03}

2017-01-26 15:20 GMT+02:00 Dr Egor <dre...@i.ua>:
> Hi!
> Please tell me how to add the ability to read the EAN-13 as 13+2 or 13+5?
>
> --
> You received this message because you are subscribed to the Google Groups "zxing" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Antonio Coppola

unread,
Jun 6, 2018, 9:42:04 AM6/6/18
to zxing
Hi,
can i read an EAN-13 with extension (5 digits) in android app?
do you have an example?

Emanuele Salati

unread,
Nov 15, 2020, 10:02:32 AM11/15/20
to zxing
Hi,
i must read from react native or flutter EAN-13 + add on 2/5
it's possible?
Reply all
Reply to author
Forward
0 new messages