对于POS命令,我正在使用从Nuget下载的dll: PrinterUtility
PrinterUtility.EscPosEpsonCommands.EscPosEpson
我使用以下方法打印年度报告
public void printreport()
{
PrinterUtility.EscPosEpsonCommands.EscPosEpson obj = new PrinterUtility.EscPosEpsonCommands.EscPosEpson();
var BytesValue = Encoding.ASCII.GetBytes(string.Empty);
BytesValue = PrintExtensions.AddBytes(BytesValue, obj.Separator());
BytesValue = PrintExtensions.AddBytes(BytesValue, Encoding.ASCII.GetBytes(" ax Title\n"));
BytesValue = PrintExtensions.AddBytes(BytesValue, CutPage());
if (File.Exists(".\\tmpPrint.print"))
File.Delete(".\\tmpPrint.print");
File.WriteAllBytes(".\\tmpPrint.print", BytesValue);
RawPrinterHelper.SendFileToPrinter("PosPrinter", ".\\tmpPrint.print");
try
{
File.Delete(".\\tmpPrint.print");
}
catch
{
}
}
现在我需要在报告中添加一个阿拉伯字符串,如下所示
BytesValue = PrintExtensions.AddBytes(BytesValue, Encoding.Unicode.GetBytes("فاتور"));
但这不起作用..我给出了一些不同的字符和符号。谁能帮忙