VintaSoft Barcode .NET SDK Discussions
Questions, comments and suggestions concerning VintaSoft Barcode .NET SDK.
Board index < VintaSoft Barcode < VintaSoft Barcode .NET SDK Discussions
/// <summary>
/// GS1 General Specifications Version 10.
/// 7.10.1. Standard Check Digit Calculations for GS1 Data Structures.
/// </summary>
public static int CalculateStandardCheckDigit(string barcodeValue)
{
int checkSum = 0;
for (int i = barcodeValue.Length - 1; i >= 0; i -= 2)
checkSum += barcodeValue[i] - '0';
checkSum *= 3;
for (int i = barcodeValue.Length - 2; i >= 0; i -= 2)
checkSum += barcodeValue[i] - '0';
checkSum = checkSum % 10;
if (checkSum == 0)
return 0;
return 10 - checkSum;
}
We will add the ability to calculate check digit of SSCC-18 barcode automatically in next version of SDK.Now iВґm triying to view the way to autocalculate the digit.You need provide 14 symbols (digits) if you want to generate GS1 barcode with Application Identifier 1. Barcode generator will check the check digit in the barcode value if you will provide digit in 14-th position of barcode value. Barcode generator will generate the check digit for the barcode value and add the check digit to the barcode value if you will provide symbol 'C' in 14-th position of barcode value.
Dim EanBox as String = "1842517400059" ' Only 13 digits with no Check
Dim Gs1_02 As New Vintasoft.Barcode.GS1.GS1ApplicationIdentifierValue(applicationIdentifiers(2), EanBox)
But doesВґnt work. What is the Code to check or generate the digit ?