3

I have defined a Zebra printer as a default printer on my Windows 7 machine. I have my ZPL code that I want to print:

"^XA^LH30,30^FO20,10^AFN,56,30^FDqwewer^FS^FO20,80,^B3N,Y,20,N,N^FD213004^FS^XZ"

Can you refer me to some example how I can send this thing to some default printer? And of course I want to print also the barcode. Thanks.

bluish
  • 26,356
  • 27
  • 122
  • 180
Night Walker
  • 20,638
  • 52
  • 151
  • 228

3 Answers3

4

I haven't looked at it for a long time but I kept a link to this article. I imagine that it could help you in the right direction.

I decided to use ThermalLabel SDK for .NET from NeoDynamic instead of handling everything myself...

HakonB
  • 6,977
  • 1
  • 26
  • 27
  • I send the bytes directly to the printer just like how HakonB suggests. It works very well. All you need to do is to determine the default printer. If you instantiate System.Drawing.Printing.PrinterSettings the resulting object it will be set to the Default Printer. Just grab it's name and away you go. If the ZPL is simple then hand bombing is simple enough (it's how we do it, we even hand code downloading of images to Zebra flash etc.) – Douglas Anderson Apr 04 '11 at 13:19
  • +1 Thanks! Expecially for the bug solved in it. Hope there are no further revelations in the 60+ comments... :) – bluish May 23 '12 at 15:52
2

If you go to the "Advanced Setup" tab of the Zebra printer driver, you can "Enable Passthrough Mode". Then, just ensure that your stream starts with ${ and ends with }$ Then the driver will not do anything to the stuff inbetween the ${ }$

should look like this:

${^XA^LH30,30^FO20,10^AFN,56,30^FDqwewer^FS^FO20,80,^B3N,Y,20,N,N^FD213004^FS^XZ}$
Ovi Tisler
  • 6,425
  • 3
  • 38
  • 63
1

This approach worked for me with a TLP2844: How to send raw data to a printer by using Visual C# .NET.

bluish
  • 26,356
  • 27
  • 122
  • 180
PhilMY
  • 2,621
  • 21
  • 29
  • Which is exactly the one that they use and improve in the article that I provide a link to in my answer :-) – HakonB Apr 04 '11 at 10:20