Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print preview ZPL II commands using .NET WinForm before sending it to Zebra printer

Tags:

I have an .NET Windows application that prints commands to Zebra printer using ZPL II or EPL2. Is there any way to print preview the data in a form before printing it directly from Zebra printer?

like image 732
hasan lamaa Avatar asked Sep 14 '11 06:09

hasan lamaa


People also ask

How do I print a ZPL label?

After downloading, open Zdesigner software and click on the Open Communication with Printer button. Click the Open File icon and select a ZPL label file from your computer. Click the Send to Printer button.

What is ZPL command?

Resolution / Answer. Zebra Programming Language (ZPL) is the command language used by all ZPL compatible printers. It is a command based language used by the printers as instructions to create the images printed on the labels.


1 Answers

Have a look at the Labelary web service, which allows you to convert ZPL to an image programmatically.

Just build a URL containing the ZPL that you want to render, get the image back from the web server, and show the image to the user from within your application.

string zpl = "YOUR ZPL HERE";
string url = "http://api.labelary.com/v1/printers/8dpmm/labels/4x6/0/" + zpl;
using (WebClient client = new WebClient()) {
    client.DownloadFile(url, "zpl.png");
}

There's also a ZPL viewer lets you edit and view ZPL directly on a web page.

like image 69
Abel Avatar answered Oct 26 '22 05:10

Abel