1 Reply Latest reply on Sep 24, 2018 8:56 AM by Robin West

    Zebra printer - Switch between different label / paper sizes on the fly programatically

    Andre Rippstein

      Hi

       

      My customer uses about 400 ZEBRA QLn320 printers with field staff distributed all over the country. Currently all printers are setup to print a label of 12cm height and 7cm width. We use gap sense mode to detect the starting position of the next label. To print the content of the label we use the ZPL language and the LinkOS XAMARIN SDK. Everything works fine so far.

       

      Due to business needs my customer needs to print to much smaller labels (2cm x 5cm) in the future. I have no problems to update the printer settings with the ZEBRA Printer Utility to the new paper format. What I'm looking for is a way to switch between these paper formats programmatically so that field staff can switch between different label sizes during the day WITHOUT connecting the printer to the ZEBRA Printer Utility.

       

      Is this possible by sending ZPL commands to the printer? Is there an example available?

       

      Thank you for your help!

        • Re: Zebra printer - Switch between different label / paper sizes on the fly programatically
          Robin West

          Hi Andre,

          You can, but it would help if you added a UI element to have the user let your app know that they changed media.  The printer has no way of really knowing that the media type changed and assumes the user always is using the same media. The QLn is 8 dots per mm.

          So you flow is:

          handle media change event

          send: '~JC'  to tell the printer to auto-detect label length

          add the ^PW command to your label formats to set the width dynamically or just send it separately as '^XA^PW400^XZ'

           

          You can also send the ^SS command to set the label length programatically, but it is not recommended as this can result in extra blank labels being printed occasionally and shorter printhead life as it is more likely to try to print on the web surface.