A library for working with ZPL templates, scaling, and printing labels
License
—
Deps
0
Install Size
—
Vulns
✓ 0
Published
Aug 1, 2025
$ dotnet add package OpenLabelOpenLabel is a C# library designed to simplify working with Zebra Programming Language (ZPL) for label printing. It enables developers to:
This library is ideal for scenarios where ZPL labels are generated dynamically or created using external tools like Labelary. Whether you need to automate label printing, generate custom ZPL templates, or adjust labels for different printers, OpenLabel makes it easy and efficient. It is the foundation for any application to print labels to your label printers!
If you find OpenLabel useful, consider starring the repo to show your support! 🌟
No more struggling with proprietary software to print your ZPL labels over the network! OpenLabel provides a developer-friendly way to manage label scaling, templating, and printing, making it perfect for:
dotnet add package OpenLabel
To print a label, you can send a ZPL string to a Zebra printer over the network:
NetworkPrinter printer = new NetworkPrinter();
await printer.PrintLabelAsync(@"\\server\printer", 5, "^XA^FO50,50^A0N,50,50^FDHello, World!^FS^XZ");You can scale a ZPL label to fit a specific printer resolution (DPI):
string scaledZPL = LabelScaler.ScaleZPL("^XA^FO50,50^FS^XZ", 203, 300);If you want to dynamically generate labels with placeholders, you can use the template system:
TemplateHandler templateHandler = new TemplateHandler();
string template = "{{IF CONDITION}}^FO50,50^FDText^FS{{ENDIF}}";
Dictionary<string, string> placeholders = new Dictionary<string, string> { { "CONDITION", "1" } };
string renderedLabel = templateHandler.RenderTemplate(template, placeholders);Join us in making OpenLabel the best open-source ZPL tool! 🎉
This software is licensed under the MIT license