Paxar 6039 Printer User Manual


 
2-2 Programmer’s Manual
VB.NET Sample
Imports Ultra ' Platinum Library
Dim fmtUPCA As String = "{F,1,A,R,E,200,200," & Chr(34) &
"UPCA" _
& Chr(34) & "|" & "C,150,49,0,50,8,8,A,L,0,0,"
& Chr(34) & "Demo _ VB.NET" & Chr(34) & "|"
& "B,1,12,F,25,28,1,4,100,7,L,0|}"
Dim rPrint As New Print ' Instantiate Print class
rPrint.ClearError() ' Clear any errors
If (Not rPrint.IsBatteryOKToPrint) Then ' Check Battery
MsgBox("Low Battery", MsgBoxStyle.OKOnly, "Battery Check")
Else
'--Print Format and then Batch Data
rPrint.Text = fmtUPCA
rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|"
rPrint.Text = "1," & Chr(34) & txtUPC.Text & Chr(34) & "|}"
End If
This example prints the data stored in the fmtUPCA string and quotation
marks (decimal value 34) around the data stored in the txtUPC.Text field.
The rPrint.Text lines contain the batch data.