2013-01-21 34 views
0

我想在熱敏打印機(Posiflex PP8X系列)上打印阿拉伯文字。我正在使用.NET API的Microsoft Point of Service(POS.net V1.12)。但是,打印機上的輸出顯示問題標記。我已經確認我的打印機可以打印阿拉伯文,通過打印來自Posiflex OPOS Manager的測試。使用POS.NET進行阿拉伯語打印

我已經嘗試過將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) 

提前非常感謝。

回答

1

我建議您使用例如Crystal Reports設計您的收據,然後將其打印到熱敏打印機。過去我很難用代碼本身使用庫進行打印。我必須做一些字符映射,而不是!

請參閱this question我問了一年多以前。

只有幾個月前我發現我可以做一個報告並打印到打印機!

+0

感謝您的回答。就我而言,無法設計和打印報告。您能否詳細告訴我如何映射阿拉伯字符並將它們發送到打印機。如果可能的話,請向我提供任何關於此事的代碼示例。 – Aram

-1

您可以使用任何記者,如Microsoft報告查看器或水晶報告來設計您的收據,然後您可以打印它,這將處理語言問題 ,因爲它取決於Windows字體。