Newbie - Printing to Zebra printer

  • Thread starter Thread starter CC
  • Start date Start date
C

CC

I'm a newbie to .NET and Google. I am trying to write a C#
application that prints a barcode label to a Zebra (thermal) printer.
I am using the PrintDocument class (System.Drawing.Printing
namespace). Though it prints to the printer, it only prints the
actual ZPL code (e.g. "^XA^LH05,...). I've tried to switch to the
Generic /Text Only driver, but before it gets to my ZPL code, it
displays the error "The data area passed to a system call is too
small." I noticed that I cannot even print a test page using this
driver. I have W2K SP3. I retrieved a pre-sp3 Driver.cab file and
tried swapping out the driver files that begin with TTY and UNI, but
that didn't work, either.

Can anyone help??

Thanks
 
You will probably need to print directly to the printer to avoid having
Unicode output by the program. See
http://www.c-sharpcorner.com/Code/2002/Oct/PrintDirect.asp for a sample
program.

Ron Allen


> I'm a newbie to .NET and Google. I am trying to write a C#
> application that prints a barcode label to a Zebra (thermal) printer.
> I am using the PrintDocument class (System.Drawing.Printing
> namespace). Though it prints to the printer, it only prints the
> actual ZPL code (e.g. "^XA^LH05,...). I've tried to switch to the
> Generic /Text Only driver, but before it gets to my ZPL code, it
> displays the error "The data area passed to a system call is too
> small." I noticed that I cannot even print a test page using this
> driver. I have W2K SP3. I retrieved a pre-sp3 Driver.cab file and
 
Back
Top