阿拉伯语打印按钮的代码
private void btnPrintArabic_Click(object sender, EventArgs e)
{
//Just For Display in List
AddList("+Print Arabic");
var source = "على";
var westernLatin = Encoding.GetEncoding(1256);
var arabic = Encoding.GetEncoding(1256);
var bytes = arabic.GetBytes(source);
var result = westernLatin.GetString(bytes); // Uáì
Printer.MapCharacterSet = true;
Printer.CharacterSet = 864;
int nRC = Printer.PrintNormal(2, result);
AddList("Print Arabic = " + nRC);
AddList("-Print Arabic " + ((nRC == (int)OPOS_Constants.OPOS_SUCCESS) ? "Succeeded" : "Failed"));
}
我在做什么都有任何错误。我尝试了很长时间的结果,但即使在堆栈中也没有正确的答案。打印机打开和关闭以及正常打印工作正常。当涉及到其他语言时它不起作用< / p>
我尝试过多次参考,但无法打印阿拉伯语
其他结果参考
Bixilon的Opos手册参考