使用.NET WinForm的发送到斑马打印机之前打印preVIEW ZPL II命令斑马、发送到、打印机、命令

2023-09-02 10:30:28 作者:毕业是一个分手的季节

我有打印使用ZPL II或EPL2命令斑马打印机的.NET Windows应用程序。 有没有办法直接从斑马打印机打印之前打印preVIEW表单中的数据?

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?

推荐答案

有一个看 Labelary Web服务,这使得你ZPL转换为图像编程。

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

只需创建一个URL包含要呈现的ZPL,获取图像从Web服务器返回,并从应用程序中显示图像的用户。

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");
}

还有一个 ZPL观众,您可以编辑和直接查看ZPL在网页上。

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

 
精彩推荐
图片推荐