【发布时间】:2012-01-18 10:41:47
【问题描述】:
我在页面模式下打印图像数据时遇到了困难。我能够在标准模式下打印图像数据,如下所示:
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 编程。
【问题讨论】:
-
我也在 android 中开发打印机。你能告诉我我们如何在android中执行POS ESC命令
-
@NareshSharma 不幸的是,由于我不熟悉您正在使用的设备,因此我无能为力。我不通过任何驱动程序打印,而是向打印机发送“原始”ESC/POS 命令。对不起。
-
我们如何向打印机发送原始 ESC/POS 命令?你能告诉我吗?
-
参见nicholas.piasecki.name/blog/2009/12/… 打印机会将发送给它的字符解释为命令序列。例如,我经常使用
echo Anthing > com3来测试我的计算机和打印机之间的通信,其中 com3 是我的打印机连接到的串行端口。请注意,这不适用于 USB 端口。
标签: printing escaping point-of-sale epson thermal-printer