I'm working on a project that requires read barcodes like GS1 128, and I want to separate them into the application identifiers (AI). I'm using a library called Bark.js.
It works fine with some barcodes, using AI like 01, 02, 15, 17, 10; but now I'm finding barcodes like:
(02) 98428844551697 (37) 0100 (3103) 022700 (15) 180205 (10) 05165
Ok, we leave out of account the parentheses, because they only appears in the human readable part.
I assume you know that some AI have variable length, in this case (37) and (10) have between 2-8 and 2-20 digits respectively. I'm ok with (10) because it is the end in almost all cases. But (37) can appears in the middle or in the end.
I've patched the Bark.js library, but I don't get this kind of control with variable length.
I'm searching for a weeks and I only find libraries to generate barcodes or read an image, but they not read the barcode and process it separating all AI.
Knowing all this, is there any other library in Javascript/Jquery or PHP to control all these cases??
PS: Sorry for my English, I'll be happy to respond to any questions.