Public Sub printbarcode(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs, ByVal barcodenum As ArrayList, ByVal barcodeqty As ArrayList, ByVal barcodeprz As ArrayList, ByVal barcodeart As ArrayList, ByVal barcodesize As ArrayList, ByVal barcodecolor As ArrayList)
Dim x1 As Integer = 0
Dim y1 As Integer = -4
Dim x2 As Integer = 28
Dim y2 As Integer = 12
Dim x3 As Integer = 24
Dim y3 As Integer = -4
Dim cnt As Integer = 0
Dim i As Integer
e.Graphics.PageUnit = GraphicsUnit.Millimeter
e.Graphics.PageScale = 1
Dim qty1 As Integer = 0
Dim qty As Integer = 0
Dim j, k As Integer
k = 0
For j = 0 To barcodeqty.Count - 1
qty = qty + Convert.ToInt32(barcodeqty(j))
Next
j = 0
Dim charCount As Integer = 0
Dim lineCount As Integer = 0
qty1 = Convert.ToInt32(barcodeqty(j))
For i = 0 To qty - 1
If (i = qty1 And qty > 0) Then
j = j + 1
qty1 = qty1 + Convert.ToInt32(barcodeqty(j))
End If
CreateEan13(barcodenum(j))
ean13.Scale = CType(Convert.ToDecimal("1.4"), Single)
If ((k Mod 2) = 0 And k > 0) Then
y = y + 26
x = 2.8
End If
e.Graphics.DrawString("Bag Zone", New System.Drawing.Font("Arial", 8, FontStyle.Bold), New System.Drawing.SolidBrush(System.Drawing.Color.Red), New System.Drawing.Point(x1 + x, y1 + y))
e.Graphics.DrawString(barcodesize(j) + " / " + barcodeart(j), New System.Drawing.Font("Arial", 7), New System.Drawing.SolidBrush(System.Drawing.Color.Black), New System.Drawing.Point(x3 + x, y3 + y))
ean13.DrawEan13Barcode(e.Graphics, New System.Drawing.Point(x, y))
e.Graphics.DrawString("Colour:" + barcodecolor(j) + " ", New System.Drawing.Font("Arial", 7), New System.Drawing.SolidBrush(System.Drawing.Color.Black), New System.Drawing.Point(x1 + x, y2 + y))
e.Graphics.DrawString("MRP ` " + barcodeprz(j) + "/-", New System.Drawing.Font("Rupee Foradian", 9, FontStyle.Bold), New System.Drawing.SolidBrush(System.Drawing.Color.Black), New System.Drawing.Point(x2 + x, y2 + y))
x = x + 50
If (qty = 0) Then
Exit For
Else
qty = qty - 1
End If
k = k + 1
Next
e.HasMorePages = False
e.Graphics.Dispose()
End Sub