Integrating GC420t printer to my application

I developed an application where I need to print the data through the zebra GC420t printer. I connected the printer using USB to my PC and Installed all the softwares required for the printer and I can print the test through the printer. Previously I installed the software and my application to other laptop it was working fine. When I open my application in previous PC it was showing a permission alert but now in different PC nothing is shown and cannot be printed.

please help me in resolving this

Dmitry Prokhorov
Hello  Bhargav,You need to

Hello  Bhargav,

You need to install Zebra Designer Label Design Software on your new PC and to check if you can print labels from Zebra Designer.

Also you may need to install your printer driver from Zebra Designer environment:

https://www.zebra.com/content/dam/zebra/manuals/software/zebradesigner/zebradesigner-pro-ug-en.pdf#page=13

Dmitry Prokhorov

Software Engineer, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


bhargav venkatesh
Hello DmitryI installed that

Hello Dmitry

I installed that Zebra Designer Software and I can the labels through that printer but not through my application

Is there any IP address to my USB printer?

Thank You

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dmitry Prokhorov
Hello Bhargav,Your GC420t has

Hello Bhargav,

Your GC420t has just a Centronics, RS-232 and USB interfaces and IP address is not applicable to any of them. A possible cause fo your issue could be in a printer name configured for your USB printer driver on another PC. It could differ from the name on initially used PC. That's why your program may fail to open connection to printer.

You may check USB printer names with following algorithm (C# pseudo-code used):


string usbPrinterName = null;

foreach (DiscoveredPrinterDriver zPrinter in UsbDiscoverer.GetZebraDriverPrinters())

{

    usbPrinterName = zPrinter.Address;

   // Print usbPrinterName value. It will be a USB printer address that you need to use with UsbConnection Constructor (String)

}


Then you will need to check and fix your app source code to use a proper USB printer name.  Please, use code from TcpConnection Class as an example. You will need to use UsbConnection instead of TcpConnection. In a nutshell you will need to perform following steps:

1) UsbConnection conn = zPrinter.GetConnection();

2) conn.Open();

3) conn.Write(Encoding.UTF8.GetBytes("..your ZPL code goes here.."));

4) conn.Close();

Don't forget to use try-catch statements to handle possible exceptions.

Hope it help.

Dmitry Prokhorov

Software Engineer, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments