2 Replies Latest reply on May 11, 2015 1:32 PM by Robin West

    XML Printing + Mirror

    Chris Misztur

      I am pushing out labels to my Mirror Server available for XML printing. I am trying to make my ZPL compatible with P4T, QLN420, ZT410s.

       

      As I am doing this I have noticed that all of my formats contain the following ZPL before the actual field definitions:

      Capture.PNG

      Most of this ZPL is unrelated to the format but more related to the printer function.

       

      I have some questions regarding ZPL commands?

       

      * Do the above commands only affect the format that they are part of?

       

      * Do commands such as ^MMx, ^MNx, ^MTx affect only the format they are part of or do they persist?

       

      * If ^MMx, ^MNx, ^MTx  persist, do they persist printer reboots or is a ^JUS or some other command required for them to persist reboots?


      Now onto XML printing:


      Could I remove the above 13 ZPL lines from each of my formats and save as an individual format eg: GENERIC_SETTINGS.ZPL... and then being able to recall this as part of my label formats, like this:

      (update: DFE should be XFE)

      Capture2.PNG


      What are the best practices in situations like this?


      thanks

      /c

        • Re: XML Printing + Mirror
          Chris Misztur

          We had a discussion internally about this and what we have come up with is this:

           

          * ZPL in format overrides every other setting

          * Windows driver has a setting to use printer settings which I assume means not to send extra ZPL (eg. darkness, speed)

          * NiceLabel or other label printing software has label specific settings which is sent down with ZPL and probably overrides the Windows driver.

           

          Does that seem correct?

            • Re: XML Printing + Mirror
              Robin West

              Hi Chris, yes the info you have is correct.  Most of the formatting information is persistent at least label to label, but not over a power cycle without a ^JUS command.  You can set up a driver to just send raw ZPL, use the media settings from the printer, or use the ones in the driver (gets added to the format).  NiceLabel and other labeling software often doesn't even use the driver mostly, just uses it for a list of connected printers.  They send direct ZPL over whatever communication channel is set up.

              Edit:  You can add the format info to a stored format and recall it later adding any data or printing you want.  This can be useful if you have multiple label formats or your customers are switching media regularly.  This gives you a programmatic way to change this up without having to send all the info over and over.  Something like:

              ^XA^DFE:SHELF.ZPL^LL200^PW406^LH0^FO10,10^GB386,180,3^XZ

              ^XA^XFE:SHELF.ZPL^FT35,50^A0N,30,30^FDFood^FS^FT35,100^A0N,30,30^FD$9.99^FS^XZ

              You only send the second line when you want to print.  Prints one label.  Or you can do this to cut down on what is sent each time:

              ^XA^DFE:SHELF.ZPL^LL200^PW406^LH0^FO10,10^GB386,180,3^FT35,50^A0N,30,30^FN1^FS^FT35,100^A0N,30,30^FN2^FS^XZ

              ^XA^XFE:SHELF.ZPL^FN1^FDFood^FS^FN2^FD$9.99^FS^XZ

              In XML it looks like this (again the first line is just sent once):

              ^XA^DFE:SHELF.ZPL^LL200^PW406^LH0^FO10,10^GB386,180,3^FT35,50^A0N,30,30^FN1^FDProduct^FS^FT35,100^A0N,30,30^FN2^FDPrice^FS^XZ

              <?xml version="1.0" standalone="no"?>

              <!DOCTYPE labels SYSTEM "label.dtd">

              <labels _FORMAT="E:SHELF.ZPL" _QUANTITY="1" _PRINTERNAME="Printer 1" _JOBNAME="LBL101">

                <label>

                <variable name="Product">Food</variable>

                <variable name="Price">$9.99</variable>

                </label>

              </labels>

              These should all print the exact same label on these printers.  You can store multiple formats at a time.  The only one I'm not sure about is if the P4T does XML printing or not.  I'll have to look that up.

              Any other questions?