如何在ESC / POS打印机上打印阿拉伯语

时间:2019-03-28 12:05:38

标签: vb.net

我正在使用Visual Studio 2005,并且想在POS热敏打印机上打印阿拉伯语。当我尝试打印时显示??????印刷中

这是我的代码:

Public Sub GiftReceipt()
        Try
            Dim displayString As String
            Dim ESC As String = Chr(&H1B) + "a" + Chr(0)
            Dim ESC2 As String = Chr(&H1B) + "@"
            Dim ESC1 As String = Chr(&H1B) + "a" + Chr(1)
            Dim ESC4 As String = Chr(&H1B) + "a" + Chr(2)
            Dim ESC5 As String = Chr(&H1B) + "!" + Chr(17)
            Dim ESC6 As String = Chr(&H1B) + "!" + Chr(1)
            Dim ESC7 As String = Chr(&H1B) + "t%"
            Dim ESC8 As String = Chr(&H1B) + "?0"
            Dim ESC9 As String = Chr(&H1B) + "R" + Chr(17)


            displayString = vbNewLine
            displayString += ESC7 + "معطار" + ESC8 + vbNewLine


            displayString += vbNewLine
            Dim pd As New PrintDialog()
            pd.PrinterSettings = New PrinterSettings()
            pd.UseEXDialog = True
            Call DefaultPrinterName()


            RawPrinterHelper.SendStringToPrinter(DefaultPrinterName, displayString)



        Catch ex As Exception

            MsgBox(ex.ToString())

        End Try


    End Sub

我一直试图将其转换为Windows-1256,还尝试使用许多esc pos命令

0 个答案:

没有答案