条码打印到Epson DFX-9000点矩阵打印机 [英] Barcode printing to Epson DFX-9000 dot matris printer

查看:96
本文介绍了条码打印到Epson DFX-9000点矩阵打印机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天

我目前正在尝试将原始数据发送到打印机(Epson DFX-9000点矩阵).有谁知道ESC序列而不使用条形码图像将条形码打印到该打印机?

Good day

I am currently trying to send raw data to my printer (Epson DFX-9000 dot matrix). Does anyone know the ESC sequences to print a barcode to this printer without using a barcode image?
i.e.

//Text place: 1=below 0=suppress

Convert.ToChar(20).ToString() + Convert.ToChar(20).ToString() + Convert.ToChar(73).ToString() + Convert.ToChar(0).ToString();

推荐答案

您是否知道要实现的目标?

查看有关您要打印的条形码类型的规格(如对比度等),然后问自己:如果我不使用点矩阵打印机上的图像,我可以准确地获得亲戚的宽度吗?规格要求吗?

答案可能不是.
发送图像,至少图像具有逐像素控制功能,并且有更高的工作机会...
Do you have any idea what you are trying to achieve?

Look at the spec for the bar code type you are trying to print as regards contrast and so forth, and then ask yourself: If I don''t use an image on a dot-matrix printer, can I accurately get the relatives widths as required by the spec?

The answer is probably not.
Send an image, at least that has pixel-by-pixel control and a much higher chance of working...


这里是解决方法:这将通过3张多张纸打印128条码.
私有void BarCode(字符串strBarcode,字符串strPrinter)
{
字符串BarcodeString = string.Empty;
List< string> PrintArray = new List< string>();

strBarcode = string.Format("{0} {1}",Convert.ToChar(65).ToString(),strBarcode);
//PrintArray.Add(string.Format("{0}{1},Convert.ToChar(27).ToString(),Convert.ToChar(64).ToString())); //重置打印机
BarcodeString = string.Format("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11}",Convert.ToChar(27 ).ToString(),
Convert.ToChar(40).ToString(),
Convert.ToChar(66).ToString(),
Convert.ToChar(6 + strBarcode.Length).ToString(),
Convert.ToChar(0).ToString(),
Convert.ToChar(6).ToString(),
Convert.ToChar(2).ToString(),
Convert.ToChar(0).ToString(),
Convert.ToChar(36).ToString(),
Convert.ToChar(1).ToString(),
Convert.ToChar(1).ToString(),
strBarcode);

PrintArray.Add(BarcodeString);
PrintArray.Add(string.Format("{0} {1}",Convert.ToChar(10).ToString(),Convert.ToChar(13).ToString()));
PrintArray.Add(string.Format("{0} {1}",Convert.ToChar(27).ToString(),Convert.ToChar(64).ToString())); //重置打印机
RawPrinterHelper.RawPrinterHelper.SendStringToPrinter(strPrinter,PrintArray);
}
Here is the solution: This will print a 128 barcode through 3 multiple paper.
private void BarCode(string strBarcode, string strPrinter)
{
string BarcodeString = string.Empty;
List<string> PrintArray = new List<string>();

strBarcode = string.Format("{0}{1}", Convert.ToChar(65).ToString(), strBarcode);
//PrintArray.Add(string.Format("{0}{1}", Convert.ToChar(27).ToString(), Convert.ToChar(64).ToString())); // Reset Printer
BarcodeString = string.Format("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}", Convert.ToChar(27).ToString(),
Convert.ToChar(40).ToString(),
Convert.ToChar(66).ToString(),
Convert.ToChar(6 + strBarcode.Length).ToString(),
Convert.ToChar(0).ToString(),
Convert.ToChar(6).ToString(),
Convert.ToChar(2).ToString(),
Convert.ToChar(0).ToString(),
Convert.ToChar(36).ToString(),
Convert.ToChar(1).ToString(),
Convert.ToChar(1).ToString(),
strBarcode);

PrintArray.Add(BarcodeString);
PrintArray.Add(string.Format("{0}{1}", Convert.ToChar(10).ToString(), Convert.ToChar(13).ToString()));
PrintArray.Add(string.Format("{0}{1}", Convert.ToChar(27).ToString(), Convert.ToChar(64).ToString())); // Reset Printer
RawPrinterHelper.RawPrinterHelper.SendStringToPrinter(strPrinter, PrintArray);
}


ASCII值?您当然有一个可疑的根源.您需要的是.NET很好地支持的普通图形打印.

如果您仍然想使用专有的东西,请向Epson寻求支持,请阅读Epson文档.低级打印机代码高度不兼容,特定于打印机.

—SA
ASCII values? You certainly took a questionable root. What you need is normal graphical print well supported by .NET.

If you still want using proprietary stuff, ask Epson for support, read Epson documentation. The low-level printer codes are highly incompatible, specific to printers.

—SA


这篇关于条码打印到Epson DFX-9000点矩阵打印机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆