首页 > 解决方案 > Zebra 打印机为 ZPL 中的数字打印随机字符

问题描述

我正在测试一些 ZPL 代码并通过我的斑马打印机 GK420d 打印它们

$leftdistance=100;
$topdistance=300;
$labeltext='100x300';
$ZplCode='^XA^FO'.$leftdistance.','.$topdistance.'^FD '.$labeltext.'^FS^XZ';
$fp = fsockopen("xxx.xxx.x.xx", xxxx, $errno, $errstr);
        fwrite($fp, $ZplCode, strlen($ZplCode));
    fclose($fp);

它返回此字符串,但在标签上,它正在打印乱码

^XA^FO100,300^FD100x300^FS^XZ

这条线应该打印100x300,但它正在打印像 ‎<code>€//xΦ// 这样的乱码字符,以100x300了解我做错了什么。

标签: phpzebra-printerszpl

解决方案


推荐阅读