How do I print preview ZPL?

B Brian Pruitt 2 years 11 months ago
2846 7 0

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?

Please register or login to post a reply

7 Replies

J Justin Souter

I know this is an old thread, but this was super useful to me previewing and validating ZPL:
http://labelary.com/

D Daniel Kuehni

The preview generated over the web interface works about 5 times. After that the web interface is down! No more printing and no web interface.
Tested on "ZTC ZE500-4 LH-300dpi ZPL".
Firmware "V53.17.22Z"

W Wouter Schut

I'm trying to get the preview working by getting it from the printers web interface. But this sometimes works, and sometimes it doesn't.

As if there is some kind of timeout 50% of the time.

I'm testing this on a "ZTC ZE500-4 LH-203dpi ZPL"

R Renato Mestre

Hi.

How I connect my printer to the network, given an IP to it?

B 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,

V Vedsatx Saddvv

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

a asd asdasd

Yes you can use this project on GitHub to create a preview from ZPL Data.
https://github.com/BinaryKits/BinaryKits.Zpl

There is a nuget package available
https://www.nuget.org/packages/BinaryKits.Zpl.Viewer/

CONTACT
Can’t find what you’re looking for?