Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 使用POS.NET进行阿拉伯语打印_Vb.net_Printing_Arabic_Pos For .net - Fatal编程技术网

Vb.net 使用POS.NET进行阿拉伯语打印

Vb.net 使用POS.NET进行阿拉伯语打印,vb.net,printing,arabic,pos-for-.net,Vb.net,Printing,Arabic,Pos For .net,我试图在Posiflex PP8X系列热敏打印机上打印阿拉伯语文本。我正在使用Microsoft的.NET API POS.NET V1.12服务点。但是,打印机上的输出显示问号。通过打印Posiflex OPOS Manager的测试,我已经确保我的打印机可以打印阿拉伯语 在将文本发送到打印机之前,我也尝试过UTF-8编码,但没有用 下面是我的代码示例,希望有人能告诉我是否遗漏了任何内容: Dim posPrinter As PosPrinter = Nothing Dim s

我试图在Posiflex PP8X系列热敏打印机上打印阿拉伯语文本。我正在使用Microsoft的.NET API POS.NET V1.12服务点。但是,打印机上的输出显示问号。通过打印Posiflex OPOS Manager的测试,我已经确保我的打印机可以打印阿拉伯语

在将文本发送到打印机之前,我也尝试过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)

非常感谢。

我建议您使用例如Crystal Reports设计收据,然后将其打印到热敏打印机上。在过去,我很难使用他们的库从代码本身打印出来。我必须做一些角色映射什么的

看,我一年多前问过


就在几个月前,我发现我可以做一份报告,然后打印到打印机上

您可以使用Microsoft report viewer或crystal report等任何报告程序来设计收据,然后您可以打印收据。这将解决语言问题
因为它取决于windows字体。

谢谢您的回答。就我而言,设计和打印报告是不可能的。你能告诉我更多的细节吗?我怎样才能把阿拉伯字符映射并发送到打印机上。如果可能的话,请向我提供关于这个问题的任何代码样本。