我正在尝试在热敏打印机( Posiflex PP8X系列)上打印阿拉伯文本。我使用的是Microsoft Point of Service for .NET API (POS.net V1.12)。但是,打印机上的输出显示问号。通过从Posiflex OPOS管理器打印测试,我已确保我的打印机可以打印阿拉伯语。
在将文本发送到打印机之前,我还尝试过对文本进行UTF-8编码,但没有用。
下面是我的代码示例,希望有人能告诉我我是否遗漏了什么:
Dim posPrinter As PosPrinter = Nothing
Dim strLogicalName As String = "PosPrinter"
Dim deviceInfo As DeviceInfo = Nothing
Dim posExplorer As New Microsoft.PointOfService.PosExplorer
Dim myString As String = "Some Text in Arabic"
deviceInfo = posExplorer.GetDevice(DeviceType.PosPrinter, strLogicalName)
posPrinter = posExplorer.CreateInstance(deviceInfo)
posPrinter.Open()
If Not posPrinter.Claimed Then
posPrinter.Claim(1000)
End If
posPrinter.DeviceEnabled = True
posPrinter.CharacterSet = 864
posPrinter.PrintNormal(PrinterStation.Receipt, myString)在此之前,非常感谢您。
发布于 2013-01-22 05:02:51
我建议您使用例如Crystal Reports设计收据,然后将其打印到热敏打印机。在过去,我很难使用他们的库从代码本身打印出来。我必须做一些字符映射以及其他的事情!
看this question我一年多前就问过了。
就在几个月前,我发现我可以做一份报告,然后打印到打印机上!
发布于 2013-10-29 07:57:34
您可以使用任何报表,如微软报表查看器或水晶报表来设计您的收据,然后您可以打印它,这将处理语言问题,因为它是依赖于windows字体。
https://stackoverflow.com/questions/14446994
复制相似问题