Interleaved 2 of 5 gives errors!

Posted by Coolbharat under ASP.NET on 12/12/2013 | Points: 10 | Views : 1813 | Status : [Member] | Replies : 1
I am using itextsharp to generate Interleaved 2 of 5 gives errors! barcode.But it gives error that "The Text Length Must Be even".Please help me on this.

BarcodeInter25 codeint2of5 = new BarcodeInter25();
codeint2of5.CodeType = Barcode.CODABAR;
codeint2of5.ChecksumText = true;
codeint2of5.GenerateChecksum = true;
codeint2of5.StartStopText = true;
codeint2of5.Code = barcodeText;
System.Drawing.Bitmap bm = new System.Drawing.Bitmap(codeint2of5.CreateDrawingImage(System.Drawing.Color.Black, System.Drawing.Color.White));
bm.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif);


Posted by: Makaveiljojo on: 12/22/2013 [Member] Starter | Points: 25

Interleaved 2 of 5 is a continuous numeric barcode type. That is to say the encodable data characters are numeric characters 0 through 9. And it encodes pairs of digits.
So the problem might be that the length you put is odd.
To learn more about Interleaved 2 of 5, refer to the following link:

Coolbharat, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response