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

前端 未结 4 1500
不知归路
不知归路 2020-12-02 19:08

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 direct

4条回答
  •  情书的邮戳
    2020-12-02 19:55

    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.

提交回复
热议问题