使用ZPL打印BMP [英] Print BMP with ZPL
问题描述
如何使用ZPL II打印位图(BMP)图像?
How can I use ZPL II to print a bitmap (BMP) image?
我用〜DY将BMP下载到打印机:
I used ~DY to download the BMP to the printer:
~DYR:PRINT,B,B, <size> , <width> , <data>
我正在使用PHP将原始数据发送到打印机,所以<>变量来自该脚本. 使用打印机的诊断实用程序,我验证了使用该命令已成功下载文件.我还能够使用TSPL打印该BMP文件,TSPL是ZPL之外该特定打印机还支持的另一种打印机语言,因此我知道BMP编写正确.
I am using PHP to send raw data to the printer, so <> variables are coming from that script. Using the printer's diagnostic utility I verified that the file was successfully downloaded using that command. I was also able to print that BMP file using TSPL, a different printer language that this particular printer also supports in addtion to ZPL, so I know that the BMP was written correctly.
我尝试使用以下代码来打印BMP:
I tried using the following code to then print the BMP:
^XA
^FO0,0^XGR:PRINT.BMP,1,1^FS
^XZ
但是它只会吐出一个空白标签.
But it only spits out a blank label.
我在做什么错了?
推荐答案
尝试以下方法:
^FO0,0^IMG:PRINT.BMP^FS
祝你好运.
这篇关于使用ZPL打印BMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!