4

I am developing a WPF desktop POS application with .NET 4.5 using Microsoft POS SDK v 1.12 And Epson OPOS ADK v 1.12.22.

I tried to print to Epson T20II receipt printer and the code works fine but when I tried printing Arabic characters it show characters separated and not concatenated like this :-

correct phrase: مصباح كهربائي

what was printed: م ص ب ا ح ك ه ر ب ا ئ ي

I have already set the characters set in SetupPos to 997 (Unicode) here is my code:

string receiptTime = receipt.ReceiptTime.ToString("dddd dd/M/yyyy  H:m:s");
printer.PrintNormal(PrinterStation.Receipt, "\u001b|cA" + receiptTime + "\n\n");
//Print items
foreach (ReceiptsItem receiptItem in receipt.ReceiptsItems)
{
    printer.PrintNormal(
        PrinterStation.Receipt, 
        string.Format("{0} X {1} \u001b|rA{2}\n",
            receiptItem.Package.Item.Name, 
            receiptItem.Quantity, receiptItem.Total));
}

printer.PrintNormal(PrinterStation.Receipt, "\n");

//Print the total cost
//\u001b|bC = Bold
//\u001b|uC = Underline
//\u001b|2C = Wide character

printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC"
    + "Total:\u001b|rA" + receipt.TotalWithoutDiscount + "\n");

printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC"
    + "Discount:\u001b|rA" + receipt.DiscountValue + "\n");

printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC"
    + "Net Amount:\u001b|rA" + receipt.TotalPrice + "\n");

printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC" +
    "Customer's Payment:\u001b|rA" + receipt.Paid + "\n");
printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC" +
    "Remaining:\u001b|rA " + receipt.Remaining + "\n\n \u001b|N");
Waxren
  • 2,002
  • 4
  • 30
  • 43

0 Answers0