2008-10-08 99 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(); 

和等。