2

我的应用程序在本地 CF 2.0 下运行,我想知道如何在 http://www.milliontech.com/home/content/view/195/95/'>Bluebird 的嵌入式打印机中连接和发送要打印的内容BIP-1300 设备。

理想情况下,我想要一个 C# 中的示例。

先感谢您。

4

2 回答 2

4

在 c# 中使用 bbpdaapi.dll(通过 google 搜索)

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();

等等..

于 2010-12-23T12:35:51.133 回答
2

我不熟悉这个特定的设备,但一般来说,这类打印机需要您发送 RAW 数据,因为它们没有 Windows 驱动程序。

此知识库文章概述了如何使用 C# 将数据发送到设备:这对您是否有用取决于所使用的非托管 API 在您的 CF 应用程序运行的环境中是否可用。

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

如果 Spooler API 不可用,或者您遇到其他问题,使这种方法比它的价值更麻烦,第三方PrinterCE.NetCF SDK也可能值得研究。

于 2008-10-08T11:52:56.950 回答