问题
Possible Duplicate:
.NET code to send ZPL to Zebra printers
My company has a Eltron 2543 thermal printer. I'm developing an VB.NET application incorporating FedEx web services to print off shipping labels.
I can save off the data file without a problem, but I was wondering how I send this data stream to a shared printer on a network. Do I need to include the Eltron 2543 driver in my solution? Sort of lost here and would love if someone could point me in the right direction.
Some solutions I've tried haven't work so I guess I'm looking for an expert who has dealt with printers (particularly thermal) to get me moving in the right direction.
Thanks.
回答1:
You want to use Win32 spooler functions. I use this code all the time to send ZPL print jobs directly to networked Zebra thermal label printers. You can send bytes, a file stream, or a string.
I've never needed any drivers, just the network path to the printer and its worked every time.
来源:https://stackoverflow.com/questions/5748908/send-data-to-thermal-printer