Zebra Printers and VB6 - Printer Object/ZPL
Zebra Printers and VB6 - Printer Object/ZPL
(OP)
HI, For the past 10 or 15 years we have used two Zebra label printers hooked up to a computer via serial port and have sent ZPL to it. We have now decided to upgrade to newer Zebra printers so we can print images on the labels, which have pretty much done what I planned, but I am running into some complications. The new printers are hooked up with a network card.
With the new printers I have just used VB6’s printer object and set X and Y coordinates to print my text and bar codes on the labels. I am not going to get into the issues that I am having, because I don't think it is relevant (but if you think so I will post it).
My main question is everything I read says to write the txt file and send ZPL to the printer. Why is this used instead of VB6's printer object? I have about 80 users that send print jobs to these printers and wondered if creating a ZPL file was a better way of printing.
With the new printers I have just used VB6’s printer object and set X and Y coordinates to print my text and bar codes on the labels. I am not going to get into the issues that I am having, because I don't think it is relevant (but if you think so I will post it).
My main question is everything I read says to write the txt file and send ZPL to the printer. Why is this used instead of VB6's printer object? I have about 80 users that send print jobs to these printers and wondered if creating a ZPL file was a better way of printing.
RE: Zebra Printers and VB6 - Printer Object/ZPL
You should find it prints much faster as well.
the easiest way to create ZPL is by using a label design program for your Zebra printer and then Print to a txt file. Design your label as normal. Use Native Zebra built in Fonts (not True Type Fonts) Print the label as normal to get it correct then when its all correct print to file.
then you use this FAQ for specific details FAQ694-2608
DougP, MCP, A+
RE: Zebra Printers and VB6 - Printer Object/ZPL
RE: Zebra Printers and VB6 - Printer Object/ZPL
As I understand it, the TLP2844 models only speak EPL while the TLP2844-Z models speak ZPL2. The languages are different. Verify your printer model and supported language in its firmware.
Jim Asman
http://www.spectracolorservices.com
RE: Zebra Printers and VB6 - Printer Object/ZPL
I have been firing code at this TPL2844 all night and it just sits there, I called Zebra who told me to go back to the supplier who then direct me to the Zebra website. I know the printer works because I can print from the Zebra software so what am I doing wrong I can anone help?
This is my code
Text2.Text contains one line at a time of the following three lines
N
B100,100,0,RL,4,4,40,B,"1234567890"
P
Private Sub Command1_Click()
With MSComm1
'make sure the serial port is open
If .PortOpen = False Then .PortOpen = True
.CommPort = 1
'set the badurate,parity,databits,stopbits for the connection
.Settings = "1200,N,7,1" ‘same as Zebra use
'set the DRT and RTS flags
.DTREnable = True
.RTSEnable = True
'enable the oncomm event for every reveived character
.RThreshold = 1
'disable the oncomm event for send characters
.SThreshold = 0
'open the serial port
.PortOpen = True
'send the data (including a tailing carriage return as often needed)
.Output = Text2.Text & vbCr
End With 'MSComm1
Dim intoone As String
intoone = Text2.Text
With Text2
'place the focus back to the textbox
.SetFocus
'select the current text to be overwritten
.SelStart = 0
.SelLength = Len(.Text)
End With 'Text1
End Sub
RE: Zebra Printers and VB6 - Printer Object/ZPL
N
B100,100,0,3,4,8,100,B,"Hello"
P1
Jim Asman
http://www.spectracolorservices.com
RE: Zebra Printers and VB6 - Printer Object/ZPL
I baught this printer expressly on the advice of EPOS Logic I asked for a printe with an VB5 or 6 STK, I got the TPL 2844 after hours of messing about I installed the Zebra Pro software which installed a print driver the printer works fine! with it's own driver however I get error 8015 telling me a paramiter is incorrect from my v code opening com1. Great I recomend if you want to use this great little printer with VB forget it unless you want a good deal of messing about. if anone knows better please let me know before I strangle EL
RE: Zebra Printers and VB6 - Printer Object/ZPL
then tried copy barcode.txt com1 nothin happend untill i instal the zebra com port driver then it copy barcode.txt com1 works fine only problem my vb application cant talk to the com port error 8015 ouch.
RE: Zebra Printers and VB6 - Printer Object/ZPL
Also, it's good practice to send a cr/lf first.
Change the following line and see if it helps.
.Output = vbCrLf & Text2.Text & vbCrLf
Mark