如何在zebra打印机上使用win-1250代码页打印?

Adr*_*fin 4 c# utf-8 epl zpl zebra-printers

我有这个用Zebra打印机打印的代码(RW 420具体)

StringBuilder sb = new StringBuilder();            
sb.AppendLine("N");            
sb.AppendLine("q609");
sb.AppendLine("Q203,26");
//set printer character set to win-1250
sb.AppendLine("I8,B,001");
sb.AppendLine("A50,50,0,2,1,1,N,\"za?ó?? g??l? ja??\"");
sb.AppendLine("P1");

printDialog1.PrinterSettings = new System.Drawing.Printing.PrinterSettings();
if (printDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
    byte[] bytes = Encoding.Unicode.GetBytes(sw.ToString());
    bytes = Encoding.Convert(Encoding.Unicode, Encoding.GetEncoding(1250), bytes);                
    int bCount = bytes.Length;
    IntPtr ptr = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(bCount);
    System.Runtime.InteropServices.Marshal.Copy(bytes, 0, ptr, bytes.Length);
    Common.RawPrinterHelper.SendBytesToPrinter(printDialog1.PrinterSettings.PrinterName, ptr, bCount);
}
Run Code Online (Sandbox Code Playgroud)

RawPrinterHelper是我从这里得到的微软课程.

我的问题是只打印ASCII字符,如下所示:

za     g  l  ja  
Run Code Online (Sandbox Code Playgroud)

缺少非ASCII字符.

有趣的是,当我打开记事本并将相同的文本放在那里并在Zebra打印机上打印时,所有字符都可以.

Han*_*ant 6

区别在于记事本正在使用打印机驱动程序,您正在绕过它.Zebra打印机支持使用其内置字体.它有代码页950的字符集和它所谓的"拉丁语1"和"拉丁语9".关键问题是它们都不包含你需要的字形.打印机驱动程序通过向打印机发送图形而不是字符串来解决此问题.编程手册在这里顺便说一句.

我认为这些打印机有某种选择来安装其他字体,如果不是这样的话,很难在世界其他地方进行销售.联系您的友好打印机供应商以获取支持和选项