How do I print preview ZPL?

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?

Anonymous (not verified)
Hi Brian,There really isn't a

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Brian Pruitt
Hi Robin,Thanks for the quick

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Fahed Abou Nada
Hi Robin;I'm a new ZPL


Hi Robin;
I'm a new ZPL developer and I have a question that might seem stupid for more experienced developers/Users.

I'm sending a ZPL file to my Zebra printer (ZE500) to print a label I designed. I would like to get a rendered bitmap of the label from the printer to compare the rendered bitmap label to printed label.

Is that possible? You have said that isn't possible to do using the driver, but I thought that the printer might generate a rendered bitmap label before printing.

Thanks in advance for your help,

Fahed

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Daniel Quagliana
Fahed, there is not a

Fahed, there is not a programmatic way to do this. Robin outlined the two options above through the printer’s webpage or label design tool like ZebraDesigner.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Fahed Abou Nada
Hi Daniel,Thank you for your

Hi Daniel,

Thank you for your Quick reply, it is much appreciated. I have already used the ZebraDesigner to generate a preview, However, the question is how accurate is that Software (ZebraDesigner) rendering compared to the actual printer rendered Image? That what I'm trying to measure.

so, there is no possible way to get the printer rendered image/label?

Thanks again for your help,

Fahed

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Daniel Quagliana
The only way to get an exact

The only way to get an exact representation is via the printer webpage method. That method utilizes the printer's on-board rendering to build the image, the same renderer that creates the actual printing.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Fahed Abou Nada
Hi Daniel,Thank you for your

Hi Daniel,

Thank you for your help, it is much appreciated.

Best regards,

Fahed

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Brian Pruitt
Hi Robin,I had a chance to

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,

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Renato Mestre
Hi.How I connect my printer

Hi.

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Shankar Peddinti
Hi ,I have installed Zebra

Hi ,

I have installed Zebra software and working on developing new shipping label. When I perform Export to Printer command through menu, I see a pop up disappearing in a second and the application hangs ( Not responding ). How can I get the pop up screen with Create File and export the label. Please advise.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Wouter Schut
I'm trying to get the preview

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"

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Daniel Kuehni
The preview generated over

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"

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Daniel Kuehni
This solution works:1. Send

This solution works:

1. Send label and save it as graphic image:

^XA

^LH30,30

^FO20,10^AFN,56,30^FR^FDZEBRA^FS

^FO20,80^B3N,Y,20,N,N^FDAAA001^FS

^FO10,160^GB150,100,4^FS

^ISR:PREVIEW.PNG,N

^XZ

2. Upload the graphic to host:

^XA^HYR:PREVIEW.PNG^XZ

The image is uploaded in the form of a ~DY command. The data field of the

returned ~DY command is always encoded in the ZB64 format.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Justin Souter
I know this is an old thread,

I know this is an old thread, but this was super useful to me previewing and validating ZPL:

http://labelary.com/

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments