命令不被斑马iMZ320理解 [英] Command not being understood by Zebra iMZ320

查看:709
本文介绍了命令不被斑马iMZ320理解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Android应用到斑马打印机(IMZ 320)打印标签,但它似乎并没有被理解我的命令行。

I'm trying to print a label from an Android app to a Zebra printer (iMZ 320) but it seems not to be understanding my command line.

当我尝试此示例code,打印机打印的所有命令到纸上,我把它们发送到打印机:

When I try this sample code, the printer prints all the commands to the paper as I send them to the printer:

zebraPrinterConnection.write("^XA^FO50,50^ADN,36,20^FDHELLO^FS^XZ".getBytes());

我读过从Zebra的官方网站ZPL编程教程,但我无法弄清楚如何使我的打印机工作没事儿与ZPL命令。

I've read the ZPL programming tutorial from Zebra's official website, but I can't figure out how to make my printer work all right with ZPL commands.

推荐答案

斑马IMZ可以在网上打印模式出货。这意味着将不会解析和间$ P $角的Z​​PL命令您提供,而是,将打印它们。你需要配置打印机ZPL模式,而不是行打印模式。下面的命令应该这样做:

The Zebra iMZ may ship in line print mode. This means that it will not parse and interpret the ZPL commands that you have provided, but rather, it will print them. You'll need to configure the printer to ZPL mode instead of line print mode. The following command should do it:

! U1 SETVARdevice.languages​​ZPL

! U1 setvar "device.languages" "zpl"

注意:在某些情况下,你可能要设置语言为hybrid_xml_zpl,而不仅仅是ZPL

Note: In some cases you may have to set the language to "hybrid_xml_zpl" instead of just "zpl"

请注意,你需要包括在这个命令结束一个换行符(或回车)。您可以使用斑马设置实用程序,通过它的沟通的角度通过点击主屏幕上的'通信'按钮,直接将命令发送到打印机,可用。

Notice that you need to include a newline character (or carriage return) at the end of this command. You can use Zebra Setup Utilities to send commands directly to the printer through its 'communication' perspective, available by hitting the 'communication' button on the main screen.

斑马设置实用程序:<一href=\"http://www.zebra.com/us/en/products-services/software/manage-software/zebra-setup-utility.html\" rel=\"nofollow\">http://www.zebra.com/us/en/products-services/software/manage-software/zebra-setup-utility.html

ZPL手册第705(详细信息的命令,比如一个上面列出): HTTPS ://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf

ZPL Manual page 705 (details command such as the one listed above): https://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf

这篇关于命令不被斑马iMZ320理解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆