c#中的打印问题。 [英] printing issue in c#.
本文介绍了c#中的打印问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一台打印机epson tm-t81。我在c#中使用以下代码打印数据。
Hi,
i have a printer epson tm-t81. i am using the below code in c# to print the data.
PosExplorer posExplorer = new PosExplorer();
DeviceCollection receiptPrinterDevices = posExplorer.GetDevices(DeviceType.PosPrinter);
DeviceInfo receiptPrinterDevice = posExplorer.GetDevice(DeviceType.PosPrinter, "PosPrinter");
PosPrinter printer = (PosPrinter)posExplorer.CreateInstance(receiptPrinterDevice);
printer.Open();
printer.Claim(10000);
printer.DeviceEnabled = true;
printer.PrintNormal(PrinterStation.Receipt, "test print 1\n");
但是在最后一行收到错误,
printer.PrintNormal( PrinterStation.Receipt,test print 1 \ n);
为microsoft.pointofservice.poscontrolexception:UnicodeDLL:-3000。 :(。是什么原因?
如何解决这个问题?
谢谢。
But getting error in last line,
printer.PrintNormal(PrinterStation.Receipt, "test print 1\n");
as "microsoft.pointofservice.poscontrolexception:UnicodeDLL:-3000". :( .what is the reason?
How to solve this?
Thanks.
推荐答案
请参阅 http:// msdn。 microsoft.com/en-us/library/microsoft.pointofservice.poscontrolexception(v=winembedded.11).aspx [ ^ ]。
您是否尝试过此代码 http://support.microsoft.com/kb/322091 [ ^ ]而不是使用MS的POS dll?
Have you tried this code http://support.microsoft.com/kb/322091[^] instead of using that POS dll from MS?
这篇关于c#中的打印问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文