0

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.

Josh Anderson
  • 438
  • 3
  • 7
Aram
  • 1
  • 1

2 Answers2

0

I suggest you design your receipts using for example Crystal Reports then print it to your thermal printer. I had a hard time in the past printing from the code itself using their library. I had to do some character mapping and what not!

see this question i asked more than a year ago.

only a few months ago I found out I could just make a report and print to printer!

Community
  • 1
  • 1
Abdusalam Ben Haj
  • 5,343
  • 5
  • 31
  • 45
  • Thanks for your answer. In my case , it is not possible to design and print a report. Could you please tell me in more details how can I map the Arabic characters and send them to the printer. If it's possible, please provide me with any sample of code regarding this matter. – Aram Jan 24 '13 at 07:51
-1

you could use any reporter like Microsoft report viewer or crystal report to design your receipt then you can print it this will handle the language issue because it is depend on windows fonts .

el3ashe2
  • 11
  • 2