Palmx (Zijang) ZJ8330 Thermal Printer Turki sh Проблема с символом c# - PullRequest
0 голосов
/ 12 июля 2020

У меня тюркский sh Проблема с символом c#. Я использую термопринтер Palmx (Zijang) ZJ8330. Кто-нибудь может мне помочь?

Мой код:

        string tempFile = "C:\\deneme.txt";
        string PrinterName = "POS-80";
        StreamReader SR = new StreamReader(tempFile, Encoding.Default);
        string all = SR.ReadToEnd();
        SR.Close();

        all += newLine;
        all += "  Ürün                    Adet      Tutar";

  
        all += newLine + " ";
        all += newLine + " ";
        all += ESC + "E";
        all += newLine + " ";
        all += newLine + " ";
        all += newLine + " Mali Değeri Yoktur";
        all += newLine + " ";

        all += newLine + " Teşekkur ederiz ";
        all += newLine + " ";


        all += ESC + "@";
        all += GS + "V" + (char)1; // Cut receipt

        RawPrinterHelper.SendStringToPrinter(PrinterName, all);

А это функция: (я использую RawPrinterHelper)

    public static bool SendStringToPrinter(string szPrinterName, string szString)
    {
        IntPtr pBytes;
        Int32 dwCount;
        // How many characters are in the string?
        dwCount = szString.Length;
        // Assume that the printer is expecting ANSI text, and then convert
        // the string to ANSI text.
        pBytes = Marshal.StringToCoTaskMemAnsi(szString);
        // Send the converted ANSI string to the printer.
        SendBytesToPrinter(szPrinterName, pBytes, dwCount);
        Marshal.FreeCoTaskMem(pBytes);
        return true;
    }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...