0
votes

I'm using a service on multiple computers that is essentially a socket and TcpListener that listens on a port for a message. This message is a byte array of ZPL code. The service then sends this array to a USB connected Zebra GK420d printer and then prints it. The byte array is sent from another application where users select different label layouts for different products. The other computers do not have admin privileges but i do not think this is the cause.

I've got the printers working on the computer at my desk and one other computer, but on other computers (about 10 more) it doesn't . All computers have a connected USB Zebra GK420d printer.

The issue I'm having is the printers flash green once, but it does not print. I know for a fact the service works fine, as when I view a CMD window, I see the ZPL message and the printer it is trying to send to. This suggests the service works and the printer gets the message, hence the flash.

I've tried a variety of drivers, updating the drivers, different USB ports, updating the .Net on the computers, deleting the printers and reinstalling them etc but nothing seems to be fixing the issue. They print test pages fine so i'm not sure what the issue is.

The computers/printers all now have identical printer properties / preferences / drivers and Windows version. However the printers were all bought at different times over the last 6 years.

2
All using generic text drivers? Does it print when you submit simple test zpl from a text editor on the non working computers? Have you updated firmware on all the printers?EdHayes3
@EdHayes3 They all use the ZDesigner GK420d drivers. I have tried the generic text drivers method but no luck. They can print hard coded ZPL code fine from the 'open communication with printer' setting in Zebra Set-Up Utility. The last firmware update (2013) was before we bought the printers so i believe they are up to date. The route i am going down at the minute is the service doesn't get all the data sent over and is trying to print too early.Roy1895

2 Answers

0
votes

I strongly recommend using the text based driver. If you are sending ZPL, that's the the cleanest option. If it didn't work before, try a simpler label/ZPL blob; there could be something wrong with the ZPL you are sending.

Else, I found this: https://code-examples.net/en/q/43c80a

  1. Right-click on the Printer and choose "Properties".
  2. On the "General" tab, click on the "Printing Preferences..." button.
  3. On the "Advanced Setup" tab, click on the "Other" button.
  4. Make sure there is a check in the box labeled "Enable Passthrough Mode".
  5. Make sure the "Start sequence:" is "${".
  6. Make sure the "End sequence:" is "}$".
  7. Click on the "Close" button.
  8. Click on the "OK" button.
  9. Click on the "OK" button.

In code, add "${" to the beginning of ZPL and "}$" to the end. This is with the Windows driver for ZDesigner.

0
votes

Turns out it was due to the ZPL code not having a new line at the end of each ZPL file that got sent over the stream.