I've been working on a small POS termal printer, and now i've run into a problem.
The problem is somewere deep down in the mystical depths of ESC commands.
However, to the point... I've printed a barcode (EAN13), The barcode comes out but there is a small problem with it. If the last digits is 0's then the printer removes them and replaces it with a apparently random number:
Here is an example:
the barcode contains:
However, the data it should contain is:
As you see the last digit is WRONG.
1012290900350 1012290900358 > WRONG! ^
And thats it.
Here is the code i use to generate the barcode with:
Const GS As Byte = &H1D Function ean13(ByVal word As String) As String Dim line as string = "" line &= Chr(GS) + "k" + Chr(67) + Chr(12) 'Same problem with chr(13) :( line &= word 'the data that the barcode should contain. line &= word 'and ofc the same data should be written below it. ean13 = line End Function
And here is the Printer model's programming manual:
Anyway to remove the faulty digit is acceptable
And Thank YOU for the help.