Hi,
Hi Vijay,
Thanks for considering Aspose.
You are right. Checksum characters are used for validation/error detection in barcodes. In some cases, we do not know the original codetext e.g. barcode label on a product box, therefore we cannot compare the decoded string with the original codetext. So, the barcode reader calculates the checksum (an algorithm based on some calculations on the scanned codetext) and compare with the scanned checksum digits.
For example, we generate the barcode as follows:
- set codetext to 1234567890
- set symbology type to EAN13
- generate barcode
- the barcode generator software will calculate the checksum "005" (based on codetext value) and append it to the end (it becomes 1234567890005)
- print the barcode label, put it on some product and ship it to some other place
Now, if the barcode label is in good condition
- The barcode scanner will detect the codetext which would be "1234567890"
- scanner would calculate the checksum based on the codetext. checksum calculated would be "005"
- scanner would also read checksum from barcode label and compare
- scanned and calculated checksums would be equal in this case
And if the barcode label is damaged, the scanner might not able to detect anything from it. But, if the label is very slightly damaged, the barcode scanner might do the same steps as in above case and detect the codetext correctly. But, the following might happen in a damaged barcode detection
- The barcode scanner detects the codetext and finds it as "1134588899"
- scanner would calculate the checksum based on the codetext. checksum calculated would be "004"
- scanner will also read checksum from the barcode label. If it scans the checksum correctly i.e. "005". The comparison would fail. Scanner will give some kind of warning that codetext is not valid
- If the barcode is damaged and checksum is also scanned incorrectly, lets say "988", it would still fail.
The overall probability of detecting valid barcodes increases if we use checksum digits.
For more information you can also refer to http://www.aspose.com/documentation/visual-components/aspose.barcode-for-.net-and-java/use-checksum-and-supplement-data-for-barcodes.html and http://whatis.techtarget.com/definition/0,,sid9_gci860231,00.html.