admin管理员组文章数量:1131573
I've tried this kind of code to have something "correct" to generate the label I need:
GS1Barcode barcode = new GS1Barcode();
barcode.ProductCode = ProductCode.ParseGtin(normalizedPresentationCode);
string barcodeString = new BarcodeParserBuilder.BarcodeParserBuilder().Build(barcode);
It's from BarcodeParserBuilder.
I wanted to have a label to send to a Zebra Printer. It's working great with 14 char product code, but it's not with a 8 char product code like "40170725" which is not accepted, so I tried by adding "0" before to be compliant (I checked here). The barcodeString is equal to "0100000040170725" at the end (I also tried with "(01)00000040170725").
To generate the zpl, I've used this:
$"^XA\r\n^FO10,15\r\n^FB390,3,0,C,0\r\n^A0,22,22\r\n^FD{parsedArticleName}\r\n^FS\r\n^FO10,70\r\n^BXN,5,200\r\n^FD{barcodeString}\r\n"
+ $"^FS\r\n^FO200,75\r\n^A0,24,24\r\n^FD{pFullPack.PresentationCode}\r\n^FS\r\n^FO250,100\r\n^A0,36,34\r\n^FDx {pFullPack.PackRemainingQuantity}\r\n^FS\r\n^FO200,140\r\n^A0,22,22\r\n"
+ $"^FD{_resourceManager.GetString("Batch")} {pFullPack.BatchNum}\r\n^FS\r\n^FO200,170\r\n^A0,22,22\r\n"
+ $"^FD{_resourceManager.GetString("Expiration")} {pFullPack.PackDateExpiry:MM/yyyy}\r\n^FS\r\n^FO10,190\r\n^A0,16,16\r\n^FD{_resourceManager.GetString("On")} {DateTime.Now:dd/MM/yyyy}\r\n^FS\r\n^XZ";
The generated label (I used this) with this and my 8 char:
But the final label is not recognized by Zxling (I tried here).
Do anyone have a clue on why my label with my qrcode (datamatrix I think) is not recognized ?
I tried giving this argument to GS1Barcode (from here, but unsuccessfully:
new GS1Barcode(BarcodeParserBuilder.Aim.AimSymbologyIdentifier.ParseString("]E4"))
Edit : I also tried to "start" with:
EanBarcode barcode = new EanBarcode();
for that, expiry date and batch are not recognized (so I skipped them in the barcode part) at all, the result is but it's not recognized by zebra scanner website. But at least, I don't have an exception anymore
本文标签: cZPL QRCode for 8 char product code not recognized (BarcodeParserBuilder)Stack Overflow
版权声明:本文标题:c# - ZPL QR-Code for 8 char product code not recognized (BarcodeParserBuilder) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736778505a1952470.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论