1 Reply Latest reply on Mar 5, 2018 9:37 AM by Robin West

    RW420 change language to ZPL

    Marcin Mietki

      Here is my code:


      string cpclData = "! 0 200 200 210 1\r\n"
                              + "TEXT 4 0 30 40 This is a CPCL test.\r\n"
                              + "FORM\r\n"
                              + "PRINT\r\n";
      string zplData = "^XA^FO20,20^A0N,25,25^FDThis is a ZPL test.^FS^XZ";
      ZebraPrinterConnection thePrinterConn = new BluetoothPrinterConnection(Mac);
      SGD.SET("device.languages", "ZPL", thePrinterConn);


      My printer prints only cpclData string.

      On zplData there is an empty label.

      When I read SGD.GET "device.languages" I got info, that "zpl" is set.

      But when I use:

       ZebraPrinter myPrinter = ZebraPrinterFactory.GetInstance(myConn);
       PrinterLanguage myPrinterLanguage = myPrinter.GetPrinterControlLanguage();


      I get CPCL. WHY ?

        • Re: RW420 change language to ZPL
          Robin West

          Hi Marcin,

          There are a few things going on here. 

          Because the printer is one of the older model printers, the SGD.SET may not work. Also case does matter with SGD commands and the proper setting is lower case "zpl".    You may have to send the entire command as raw data:  "! U1 setvar \"device.languages\" \"zpl\"\r\n"


          Why the printer.GetPrinterControlLanguage is telling you it's CPCL is another issue entirely.  This is a common question and it has to do with the difference between the control language of the SDK and the language of the printer.  Unfortunately, the GetPrinterControlLanguage function is not requesting the current language of the printer, but the assumed default language based on it's firmware version.  You will need to request the current firmware version with the data command: "! U1 getvar \"device.languages\"\r\n"


          Find more info on this in: Best Practices For Printing