Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic Programming and Zebra ZPL Printer 2

Status
Not open for further replies.

eusriso

Technical User
Aug 4, 2002
2
US
I am having a difficult time programming VB 6 to output to a Zebra printer.

The VB Code reads a text files and sends it to a Zebra 105SE using ZPL II. We are using generic drivers. Nothing prints.

When we do a raw hex dump we can see the caret (^) is being stripped.

The first charecter is always being stripped.

IF we use the Windows Zebra driver it prints the raw ZPL code with the charecter.

Why is the (^) being stripped (really the first character).

Help!!!

Thanks!
 
Can you post the VB code here????
Or send it direct
dposton@barcodeone.com DougP, MCP
 
Any luck with sending ZPL to the printer? I used the generic/text only driver in the past and was able to produce bar codes but now cannot.

Wondering if you were ever able to get this to work...

Tim
 
Thinking this is what you're looking for,
if the printer is on a Comm port with the activeX control
MS Comm Control 6.0 (Ctrl+T in vb 6 design) it should work this way,....

create a new vb PRJ
add a comm control, checkbox & button on the form
put this code for the Command1_Click event,....
run the stuff

Private Sub Command1_Click()
' Buffer to hold input string
Dim Instring As String
' Use COM1.
MSComm1.CommPort = 1
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True

' Send the command to the printer,...?

' eens zonder de chr(13) ook proberen
If Check1.Value > 0 Then
MSComm1.Output = "^XA^FO20,20^AG^FDTest^FS^XZ" & Chr$(13) ' Ensure that
Else
MSComm1.Output = "^XA^FO20,20^AG^FDTest^FS^XZ"
End If

' the modem responds with "OK".
' Wait for data to come back to the serial port.

' Read the "OK" response data in the serial port.
' Close the serial port.
MSComm1.PortOpen = False
End Sub

I hope this works out for ya
Greetz

~vOOs~
 
After applying Windows 2000 SP3 the same problem happens on my systems. In my case I am writing an output stream of formatted barcode text to an TEC-482 printer. Each line of text starts with a { character which is now stripped off by the generic/text printer driver. The low tech workaround I have used was to add an extra { to the start of each line of output text and it works OK. I also found that if I redirected the output to a .txt file, opened in Notepad and printed to the Generic/Text printer the leading { on each line was not stripped off and it printed normally.
 
i had this problem too after installing sp3, i am glad i found your post, it confirmed my suspicions, and made me search microsoft's site more diligently for a solution, and i found they have a hot fix for this. its not easy to get, but the will send it to you. there are instructions at this link: [LN];q328894 or search for knowledge base article q328894. hope it helps.
 
Speeder,

When I go to your link I get:

Directory Listing Denied

This Virtual Directory does not allow contents to be listed.

To get the real link right click on the page, select properties and cut and paste the address.

Thanks
 
I have a problem for you guys, I coded a small label in ZPL that I send to the printer via access97. now when I try to print if i didn't use Bar One before it will print blank sticker e.i "I turn the printer off then back on, the printer will not print any sticker but only blank labels will come out. now If I use Bar One once I will be able to print label with access as long as the printer will not go off again"

any clue from where this problem come from

here is my code.

Data1 = "^XA" & _
"^FO89,20^A0N,25,18 ^FDWaranty void if removed^1,1^FS" & _
"^FO93,45^A0N,24,17^FDGarantie Annule si enleve^1,1^FS" & _
"^FO117,75^AB^FD" & SNum & "^1,1^FS" & _
"^PQ3,0,1,Y^XZ"

Open "LPT1:" For Output As #1
Print #1, Data1
Close #1

tnx in advance for your help
 
resolved my problem, I had to set the label home position and label length

^XA^LH0,0^LL113
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top