4 Replies Latest reply on Nov 30, 2017 2:20 AM by jofin george

    Can I use myanmar3 font with iMZ320?

    aung kyaw

      I want to print with Myanmar font. Is it possible to use with ZPL or not?

      Font download link -> http://code.google.com/p/myanmar3source/downloads/detail?name=mm3.ttf

      Please kindly suggest.


      Aung Kyaw Kyaw Bo

        • Re: Can I use myanmar3 font with iMZ320?
          Robin West

          Hi Aung,

          Please use Zebra Setup Utility to download the font to the printer.  ZPL should be able to wok with most ttf fonts.

            • Re: Can I use myanmar3 font with iMZ320?
              jofin george

              Hi Robin ,


              I am an iOS developer. I need to install some fonts in zebra iMZ320 from my iOS application. I used the CISDFCRC16 command,But printer is not printing anything.


              My Code is Pasted below :


              NSString *fontFilePath = [[NSBundle mainBundle] pathForResource:@"UPCA" ofType:@"TTF"];

                  NSData *data = [NSData dataWithContentsOfFile:fontFilePath];;


                  NSString *file = [data base64EncodedStringWithOptions:0];

                  NSUInteger length = file.length;

                  NSString *dataString = [NSString stringWithFormat:@"! CISDFCRC16\r\n 0000\r\n E:UPCA.TTF\r\n %lu\r\n 0000\r\n %@",(unsigned long)length,file];

                  NSData* dataWrite=[dataString dataUsingEncoding:NSUnicodeStringEncoding];

              //    NSData data = NSData.FromString (@"! CISDFCRC16" + "\r\n 0000\r\n E:SIMSUN.TTF\r\n "+ size + "\r\n 0000\r\n" + file);


                  [self.connection write:dataWrite error:&error];


              // NOTE : self.connection is the ZebraPrinterConnection object.


              Could you please help me to find the issue in my code ?

                • Re: Can I use myanmar3 font with iMZ320?
                  Robin West

                  Hi Jofin,

                  You do not need to base64 encode the TTF file. The binary TTF file should work fine here.    You might want to look into the FileUtil functions as well to send the file and verify it got sent.

                    • Re: Can I use myanmar3 font with iMZ320?
                      jofin george

                      Hi Robin,


                      Thank you for your reply.

                      I used FileUtil function for sending TTF file to the printer but it fails to write.


                      So I tried the code below to write file(A7.CPF) to the printer, it works fine and I am able to see this in the font listing section of device configuration. You can see that in the screenshot below. But the device is  not printing any ZPL language that I send to printer. Please check my code below and share your comments.



                      NSData *data = [NSData dataWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"A10B" ofType:@"fon"]];

                              unsigned char aBuffer[20];

                              NSString *command = [NSString stringWithFormat:@"! CISDFCRC16\r\n0000\r\nE:A10B.cpf\r\n0x%08lx\r\n0000\r\n,%@",(unsigned long)data.length,data];

                           //   const char *utfString = [command UTF8String];

                              NSMutableData *data1 = [NSMutableData dataWithData:[NSData dataWithData:[command dataUsingEncoding:NSUTF8StringEncoding]]];

                              [data1 appendData:data];

                             NSInteger write =  [self.connection write:data1 error:&error];