VB.NET printing to GK420d Issue

Hi!
I'm trying to print a text using ZPL and all i'm getting is garbage. Am I missing something? or the printer is not capable of ZPL? Attached is the label output and below is the code. Help please!

Private Sub SendZplOverTcp(ByVal theIpAddress As String)
Dim thePrinterConn As Connection = New TcpConnection(theIpAddress, TcpConnection.DEFAULT_ZPL_TCP_PORT)

Try
thePrinterConn.Open()
Dim zplData As String = "^XA^FO20,20^A0N,25,25^FDThis is a ZPL test.^FS^XZ"

thePrinterConn.Write(Encoding.UTF8.GetBytes(zplData))

Catch e As ConnectionException
Console.WriteLine(e.ToString())
Finally
thePrinterConn.Close()
End Try
End Sub

Attachments: 
Steven Si
To print ZPL formatted label,

To print ZPL formatted label, you need to make sure that the device.languages setting on the printer is ZPL. The following SGD commands can be used to check and modify the setting.

! U1 getvar "device.languages" // Check the setting of the device.languages
! U1 setvar "device.languages" "ZPL" // Set the device.languages as ZPL.
 

 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments