3 Replies Latest reply on Nov 13, 2015 7:02 AM by Brian Pruitt

    How do I print preview ZPL?

    Brian Pruitt

      I have a couple dozen industrial printers that I send ZPL to, which works fine. However I would like to do a "print preview" while developing labels. As of now I'm modifying the ZPL and just sending to the printer. I have installed the latest printer drivers. "Version 5.1.07.5682"

       

      Is there a method of using the printer driver, from a C# application, to Print Preview ZPL?

        • Re: How do I print preview ZPL?
          Robin West

          Hi Brian,

          There really isn't a way to get a print preview through the driver.  Zebra drivers don't really render a bitmap, but ZPL that the printer understands.  Also drivers aren't bi-directional, so there is no way to get an image from the printer with it.

           

          There is an alternative though.  If the printer is connected to the network you can access a print preview using the printer's webpage.  The url to use is formatted like this: http://10.80.127.80/zpl?dev=R&oname=TEST&otype=ZPL  where the IP address of the printer is given as well as the ZPL file name (TEST) of the format you want to preview.  You can either parse the html yourself to get the bitmap, or embed a WebBrowser component into your application.  The full "website" can be accessed by just entering the IP address flowed by /index.html.

           

          You could also use a label design tool that would allow you to lay out your label formats in a GUI.  We have many partners with excellent tools, many of which include a print preview functionality for production use, or you could use our free tool ZebraDesigner for your own creation and testing needs. 

          Hope this helps,

          Robin West

            • Re: How do I print preview ZPL?
              Brian Pruitt

              Hi Robin,

               

              Thanks for the quick response. I did not know you could could use the printers webpage to do a print preview. This should work nicely. We have S4M's, ZT410's and 110Xi4's all over the plant so this solution should work nicely.

               

              I'm a little surprised that an API isn't offered by Zebra that accepts ZPL and outputs a bitmap or other image type. I've rolled my own API to help in our automated print processes on the shop floor. Nothing special, just creates properly formatted ZPL. However it would be nice to have ZPL modeled completely in a .Net library.

               

              Thanks again.

              Brian

            • Re: How do I print preview ZPL?
              Brian Pruitt

              Hi Robin,

               

              I had a chance to test the url suggestion. I ended up using this url:

              http://172.28.22.211/printer/zpl?dev=R&oname=TEST&otype=ZPL

               

              That does get me into the printer, but takes me to an editor page to edit the ZPL. That page does have a preview button that works, but I was hoping the url would take me directly to the print preview. Is there an option that I am missing in the url that would do this?

               

              Regards,