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,
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.
I had a chance to test the url suggestion. I ended up using this url:
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?