使用 ZPL 打印 BMP
如何使用 ZPL II 打印位图 (BMP) 图像?
我使用 ~DY 将 BMP 下载到打印机:
~DYR:PRINT,B,B, <size> , <width> , <data>
我使用 PHP 将原始数据发送到打印机,所以 <>变量来自该脚本。 使用打印机的诊断实用程序,我验证了该文件是否已使用该命令成功下载。我还能够使用 TSPL 打印该 BMP 文件,TSPL 是一种不同的打印机语言,除了 ZPL 之外,该特定打印机还支持该语言,因此我知道 BMP 写入正确。
我尝试使用以下代码来打印 BMP:
^XA
^FO0,0^XGR:PRINT.BMP,1,1^FS
^XZ
但它只吐出一个空白标签。
我做错了什么?
How can I use ZPL II to print a bitmap (BMP) image?
I used ~DY to download the BMP to the printer:
~DYR:PRINT,B,B, <size> , <width> , <data>
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.
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.
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
试试这个:
祝你好运。
Try this instead:
Good luck.
根据我的信息,您不能使用 .BMP 扩展名,因此它被设置为固定值,即 .GRF
也检查这一点 -> http://www.servopack.de/support/zebra/ZPLII-Prog.pdf
After my information you canNOT use .BMP extension, thus it is set to a fixed value, which is .GRF
Check this as well -> http://www.servopack.de/support/zebra/ZPLII-Prog.pdf
您可以使用 ZebraNet Bridge 将 BMP(或 PNG、JPG 等)转换为 GRF 格式
http://www.zebra.com/id/zebra/na/en/index/drivers_downloads/utilities/other_utilities/zebranet_bridge_enterprise.html
You can use ZebraNet Bridge to convert your BMP (or PNG, or JPG, etc) to GRF format
http://www.zebra.com/id/zebra/na/en/index/drivers_downloads/utilities/other_utilities/zebranet_bridge_enterprise.html
以下是下载 Zebra 设置实用程序的链接:
https://www.zebra.com/us/en/support-downloads/eula.-227178c9720c025483 893483886ea54dde80fe8dccd74087deac0002665121f1b906a97e0267e4c60078aef6cd4a559.html
启动应用程序后,我按下“安装新打印机”按钮并安装了随机打印机。
安装打印机后,选择打印机并按“下载字体和图形”按钮。这将安装“ZebraDesigner 字体和图形下载器”。
您可以使用此实用程序将位图转换为斑马位图。
我现在正在遵循这些指示。我会让你知道它是否有效。
https://km.zebra.com/kb/index?page=content& ;id=SO7892
该软件可以运行,但我仍然无法将 .bmp 转换为实际的 ZPL 位图。
Here is the link to download the Zebra Setup Utilities:
https://www.zebra.com/us/en/support-downloads/eula.-227178c9720c025483893483886ea54dde80fe8dccd74087deac0002665121f1b906a97e0267e4c60078aef6cd4a559.html
Once I launched the app I pressed the "Install New Printer" button and installed a random printer.
After installing the printer, select the printer and press the "Download Fonts and Graphics" button. This will install the "ZebraDesigner Fonts and Graphics Downloader".
You can use this utility to convert bitmaps to zebra bitmaps.
I am following these directions now. I'll let you know if it works.
https://km.zebra.com/kb/index?page=content&id=SO7892
The software works, but I still can't convert a .bmp to an actual ZPL bitmap.
该站点提供了一个 ZPL 查看器,其中包含导入图像的功能。导入后,图像将转换为 ZPL 并提供生成的代码。
http://labelary.com/viewer.html
显然这仅适用于静态图像。
This site provides a ZPL viewer that includes the ability to import an image. When imported, the image is converted to ZPL and the resulting code is provided.
http://labelary.com/viewer.html
Obviously this will only work for static images.