printing - 用于以页面模式打印图像数据的 ESC-POS 代码

标签 printing escaping point-of-sale epson thermal-printer

我在页面模式下打印图像数据时遇到困难。我能够按如下方式在标准模式下打印图像数据:

   data[] = { ESC   , 
              '*'   ,
                0   , // 8-dot single density mode
              width , // nl: image width
                0   } // nh: image width

   for each 8 x image_width block of pixels in a monochrome image
        for each 8 x 1 (vertical) strip of pixels in the block
             append pixel (0 or 1) data to the array, data[]
        write data to COM port

我在页面模式下的打印(不成功)尝试是上述方法的变体,并按如下方式进行:

     select page mode by writing the chars, ESC and 'L' to the COM port
     write pixel data as described above
     print by writing the characters ESC and FF

我做错了什么?我是否必须指定打印区域或类似的东西?

顺便说一句,我正在为 Epson TM-T88III 编程。

最佳答案

找到了答案。在将每 8 x image_width 像素 block 写入 COM 端口后,写入 ESC J n(打印和进纸)命令。

关于printing - 用于以页面模式打印图像数据的 ESC-POS 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8474294/

相关文章:

HTML5 到 PDF 服务器端

python - 清理用户输入以包含在 href 属性中?

escaping - 如何在 Microsoft Log Parser 查询中转义通配符?

javascript - 类型错误: module.PosModel 未定义

PHP打印热敏收据打印机

python - 如何在 Python 中打印粗体文本?

应用程序的 JavaPos。加载的 JCL 注册表中不存在服务

ios - 从 iOS 打印的分步教程?

java - 如何在 CDATA 之外编写未转义的 XML

.net - 适用于 Windows 7 的 Epson OPOS ADK for .NET 驱动程序