从 UPS 收到奇怪的 ZPL 代码(如何解码此 ZPL 代码?)

Strange ZPL code receive from UPS (How to decode this ZPL code?)

我使用 UPS API 发送 'ShipRequest',我知道我们可以收到标签图像作为 UPS 的回复。

但是当我请求图像格式为 'ZPL' 时,它不是 ZPL 语言而是未知语言,如下所示:

Cl5YQV5MUk5eTU5ZXk1GTixOXkxIMTAsMTJeTUNZXlBPSV5QVzgxMl5DSTI3CgpeRk82MjAsMTE0MApeR0ZBLDAwOTY5LDAwOTY5LDAxOSxGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRjAwMDAwMDAwMApGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRjAwMDAwMDAwMApGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRjAwMDAwMDAwMApGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRjAwMDAwMDAwMApGMDAwMDAwMDAwMDAwMUY4MDAwMDAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwMDAwMUY4MDAwMDAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwM0Y4MUY4M0ZDMDAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwM0Y4MUY4M0ZDMDAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwRkZGOUY5RkZGMDAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwRkZGOUY5RkZGMDAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwRkZGRkZGRkZGQzAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwRkZGRkZGRkZGQzAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwRjA3RkZGRjBGQzAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwRjA3RkZGRjBGQzAwMDAwMDAwRjAwMDAwMDAwMApGMDAwMDAwMDAwRkMxRkZGQzNGMDAwMDAwMDAwRjAwMD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ZXNjcmlwdGlvbl5GUwpeRlQxNSwxNTNeQTBOLDI4LDMyXkZWU0hJUCBUTzogXkZTCl5GTzAsNjM3XkdCNzk4LDE0LDE0XkZTCgpeRk8wLDk5N15HQjgwMCwxNCwxNF5GUwoKXkZPMCw0MTZeR0I4MDAsNCw0XkZTCgpeRk8yNDAsNDE2XkdCMywyMjEsM15GUwoKXkZUMTkwLDExODheQTBOLDE0LDIwXkZWWE9MIDE4LjA5LjA5ICAgICAgICAgIE5WNDUgMDYuMEEgMTAvMjAxOF5GUwpeRlQxMDUsOTgyXkJZM15CQ04sMjAyLE4sTiwsQV5GVjFaUlcwMTc1MDM5OTkwNTMyOV5GUwoKXkZUMjczLDg5Nl5BME4sOTUsNzReRlZTQU1QTEVeRlMKXlhaXlhaCg==

ZPL 语言应该如下所示: ^XA ^FO40, 40 ^GB300,203,8^FS ... ...

那么 UPS 的这种语言响应是什么?我如何将这种未知语言解码为 ZPL 语言?

谢谢大家!

大多数情况下,运营商网络服务 return 一个 ZPL 代码,以 base 64 编码。只需对其进行解码,您将获得 UPS 生成的真实 ZPL 代码。 (尝试 https://www.base64decode.org/

看起来像这样:https://imgur.com/a/Ev5cTgE

将以上代码复制并粘贴到 'base64decode' url 中。您将获得 ZPL 格式标签字符串。

从Base64格式解码 https://www.base64decode.org/

然后复制字符串并粘贴到 'labelary' url。重新绘制图像,您将看到样本标签打印。

http://labelary.com/viewer.html

以上是手工作业。您可以使用 API 执行此操作。只需解码代码中的字符串并将 ZPL 字符串发送到以下 API。您将获得标签图像并将其发送到热敏打印机。先在邮递员上查一下。

http://api.labelary.com/v1/printers/8dpmm/labels/4x6/0/

以下是执行以下操作后收到的示例图像:

  1. 解码字符串
  2. 将 zpl 字符串粘贴到 'labelary' url。