I am trying to print Arabic text on a thermal printer ( Posiflex PP8X Series ). I am using the Microsoft Point of Service for .NET API (POS.net V1.12). However, the output on the printer is showing questions marks. I have made sure that my printer can print Arabic, through printing a test from the Posiflex OPOS Manager .
I have also tried UTF-8 encoding the text before sending it to the printer, but no use.
Below is a sample of my code, hope someone can tell me if I am missing anything:
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)
Many thanks in advance.