php - 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
了解我做错了什么。
解决方案
推荐阅读
- python - 如何解决对象没有属性'strftime'
- php - 如何使用codeigniter从一个表中移动多行并插入另一个表
- python - 如何通过组合 value_counts() 来制作数据框
- kubernetes - 使用 Kubeadm 部署的 CoreDNS 和 Ubuntu 18.04 集群的 Kubernetes DNS 解析问题
- ruby-on-rails - RAILS_ROOT/public 下的 Ruby on Rails 文件授权
- sql - SQLite:即使有索引,大型数据库中的查询也非常慢
- java - 无法在 Intellij IDEA 的 Spring Boot 中添加一个等于和哈希码的实体?
- sql - 当许多连续行的压力值相同时查找Machine_ID
- vim - Vim:如何检测命令中的范围类型?
- javascript - Javascript:export * from ... 使构建文件太重