2008-10-08 147 views

回答

2

我对这个特定的设备并不熟悉,但是通常这个类的打印机要求您发送RAW数据,因为它们没有Windows驱动程序。

This KB article概述了如何使用C#将数据发送到设备:是否这对您有用取决于您的CF应用程序运行的环境中是否有可用的非托管API。

如果API支持,您需要下一步是设备的正确转义代码,以获得您想要的纸上结果。这些通常在打印机手册中有详细记录。

如果后台打印程序API不可用,或者遇到其他问题导致此方法比它的价值更麻烦,则第三方PrinterCE.NetCF SDK也值得研究。

4

使用bbpdaapi.dll(通过谷歌搜索) 和C#

using Bluebird.BIP.Printer; 
... 
this.prn1 = new Bluebird.BIP.Printer.Printer(); 
if (!this.prn1.Open(0)) 
      { 
       MessageBox.Show("Can not open Printer", "Printer problem"); 
      } 
this.prn1.PrintText("sdfgidfui", 0); 
this.prn1.PrintBitmap(@"\My Documents\sample.bmp", 0); 

if (this.prn1.WaitUntilPrintEnd() == 1) 
{ 
MessageBox.Show("No paper in Printer", "Printer problem"); 
       } 
      } 
this.prn1.Close(); 

和等。