Is there any way to use the images stored in a Zebra printer in the following code:
Dim g As Graphics = e.Graphics
Dim bc As New BarcodeProfessional
Dim br As Brush = New SolidBrush(Drawing.Color.Black)
Dim blackPen As New Pen(Color.Black, 5)
e.Graphics.DrawArc(blackPen, 10, 10, 70, 50, 130, 100)
g.DrawString("UPC", Arial_6_bold, br, 210, 15)
the above prints an arc, and a "UPC" text, now can I print here also an image stored in the Zebra printer?
I have found that I can send ZPL code to the printer in this way:
Dim ipAddress As String = "10.3.14.59"
Dim port As Integer = 9100
Dim ZPLString As String = _
"^XA" & _
"^FO50,50" & _
"^A0N,50,50" & _
"^FDHello, World!^FS" & _
"^XZ"
Try
'Open Connection
Dim client As New System.Net.Sockets.TcpClient
client.Connect(ipAddress, port)
'Write ZPL String to Connection
Dim writer As New System.IO.StreamWriter(client.GetStream())
writer.Write(ZPLString)
writer.Flush()
'Close Connection
writer.Close()
client.Close()
Catch ex As Exception
'Catch Exception Here
End Try
But I don't know how to put together both codes, any idea?