How to Print Zebra GC420T on c# when shared printer.

Y Yusuf Gunaydin 3 years 6 months ago
215 1 0

Hi, My name is Yusuf.
İ have a printer of Zebra-GC420t model.
i print when is connected with usb port its ok.
İ wanna share this printer for my client (win10 x64) user to use on my software to print.

But i cant print.
Any one can help me ?

its my code ..

public void EtiketYaz(TabloList s)

try
foreach (DiscoveredUsbPrinter usbPrinter in UsbDiscoverer.GetZebraUsbPrinters())

catch (Exception)

"Yazıcı Bağlantısı Sağlanamadı.");

return;

try
string t = "";

int y = 10;

if (s.ilad.Length 6)

else if (s.ilad.Length > 6 & s.ilad.Length 15)

else if (s.ilad.Length > 15)

else
"^XA";

"^CI28";

"^FO070,30^A0N,30,30^FDBASKI TARIHI :" + DateTime.Now.ToShortDateString() + "^FS";

"^FO" + y + ",60^A0N,50,30^FD" + s.ilad + "^FS";

"^FO060,120^A0N,30,30^FD" + neresi + "^FS";

"^FO020,160^A0N,70,70^FD" + s.HostName + "^FS";

"^FO060,220^A0N,30,30^FDSERI NO: " + s.SeriNo + "^FS^XZ";

                    con.Write(Encoding.UTF8.GetBytes(t));

catch (Exception)

return;

finally

Please Register or Login to post a reply

1 Replies

Y Yanis Dalabiras

Hi Yusuf,
You want to set up the printer driver as a shared printer.
Then you change the discovery code to:
foreach (DiscoveredPrinterDriver printer in UsbDiscoverer.GetZebraDriverPrinters())You should be able to then use that with shared printers. 
It is slower than direct USB connections though.
Hope this helps, Robin

CONTACT
Can’t find what you’re looking for?