如何从C#打印到Bluebird BIP-1300热敏打印机?
-
06-07-2019 - |
题
我的应用程序在本地CF 2.0下运行,我想知道如何在http://www.milliontech.com/home/content/view/195/95/的嵌入式打印机中连接和发送内容。 '> Bluebird BIP-1300设备。
理想情况下,我想在C#中使用一个例子。
提前谢谢。
解决方案
我不熟悉这个特定的设备,但一般来说,这类打印机要求你发送RAW数据,因为它们没有Windows驱动程序。
此知识库文章概述了如何使用C#将数据发送到设备:这是否是对您有用取决于所使用的非托管API是否在您运行CF应用程序的环境中可用。
如果支持API,接下来需要的是设备的正确转义码,以获得所需的纸上结果。这些通常在打印机手册中有详细记载。
如果后台处理程序API不可用,或者您遇到其他问题导致此方法比其价值更麻烦,则第三方 PrinterCE.NetCF SDK 也值得研究。
其他提示
使用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();
等等。
不隶属于 StackOverflow