1 Reply Latest reply on Aug 31, 2018 12:44 PM by Robin West

    ZPL Graphic Field Z64 Data Encoding

    Jim Jensen

      I am developing a .NET application that will dynamically create a ZPL file containing a user specified graphic then send to a Zebra printer. I am using ZebraDesigner v2.5.0 as a starting point for creating the ZPL file. This application outputs graphics as ^GFA,b,c,d,:Z64:data:cccc. The ZPL II manual describes Z64 as a format using LZ77 compression with Base64 encoding but doesn't provide many specifics. I have tried numerous algorithms and graphic formats but have been unsuccessful in generating the correct Z64 encoded data.

       

      My questions are:

      1. Does the current Zebra SDK incorporate the Z64 encoding algorithms?
      2. Is source code available that generates the proper image format, compresses, encodes, then calculates a checksum for the Z64 encoding?
      3. Is there a document that describes which LZ77 algorithm is used to compress the image?
      4. What image / pixel format is required before compressing the data?
      5. How are the parameters b, c, and d calculated when using the Z64 encoding?
      6. Does ZebraDesigner offer an API that could be used to gain access to the Z64 algorithm?
      7. What minimum printer firmware is required to recognize the Z64 encoding?

       

      Thanks!

        • Re: ZPL Graphic Field Z64 Data Encoding
          Robin West

          Hi Jim,

          1. Does the current Zebra SDK incorporate the Z64 encoding algorithms? RW: Yes, see the Printer.PrinterUtil.ConvertGraphic() method.
          2. Is source code available that generates the proper image format, compresses, encodes, then calculates a checksum for the Z64 encoding? RW: See below for a short sample.
          3. Is there a document that describes which LZ77 algorithm is used to compress the image? RW: The ZPL Programming Guide goes into it a little, but it is a standard.
          4. What image / pixel format is required before compressing the data? RW: Usually PNG, but the SDK will take PNG, JPG, BMP and few others.
          5. How are the parameters b, c, and d calculated when using the Z64 encoding? RW: I'm not sure I understand the question.
          6. Does ZebraDesigner offer an API that could be used to gain access to the Z64 algorithm? RW: See question 1
          7. What minimum printer firmware is required to recognize the Z64 encoding? RW: I think it was v14, as in vXX.14.01Z firmware versions and above.  As this firmware version has been out for over 10 years, it shouldn't be a big issue.

          Robin