我在页面模式下打印图像数据时遇到困难。我能够按如下方式在标准模式下打印图像数据:
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/