Search code examples
c#compact-frameworkzebra-printers

How to send a Font File to a Zebra Printer (MZ 220) via .Net SDK?


I have to send custom Font Files to a Zebra MZ 220 Printer via C# and the Zebra .Net SDK. That SDK provides a SendFile() Method and it works with template Files percectly but whenever I send a Font File the printer starts printing out the File while receiving it. The Zebra Software Label Vista has a Menu option Send Font but I have to do ist programmatically.

Does anyone know how to send Font Files to the Printer?

Thank you very much

twickl


Solution

  • You will need to wrap the file in a special download command in order for the printer to store the file.

    The command is detailed in the ZPL Guide under "CISDFCRC16".

    Basic format for the command -

    ! CISDFCRC16
    <crc>          // 4 digit hex CRC.  Enter 0000 to turn off CRC check.
    <filename>     // file name with extension.  8.3 filenames only.
    <size>         // eight digit hex file size in bytes.
    <checksum>     // four digit hex checksum.  Enter 0000 to turn off checksum validation.
    <data>         // Binary data to store
    

    This will allow you to store a file on the printer's file system.

    Note: The printer will not understand a typical .ttf file. You will need to convert the font to a .CPF file using Label Vista, and then send it down using this command.