GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” openlabel/OpenLabel at master ยท Dwarf1er/openlabel

Expand file tree

/

OpenLabel

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

OpenLabel

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Printing
Printing
 
 
Scaling
Scaling
 
 
Shared
Shared
 
 
Templating
Templating
 
 
OpenLabel.csproj
OpenLabel.csproj
 
 
README.md
README.md
 
 

README.md

Outline

OpenLabel

ZPL Labeling with Open-Source Flexibility

Project Description

OpenLabel is a C# library designed to simplify working with Zebra Programming Language (ZPL) for label printing. It enables developers to:

  • Print labels to Zebra printers over the network.
  • Scale ZPL code to fit different printer resolutions (DPI).
  • Use a powerful templating system to replace placeholders and handle conditional statements.

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! ๐ŸŒŸ

Why OpenLabel?

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:

  • E-commerce & Warehousing โ€“ Automate label printing for shipping.
  • Manufacturing โ€“ Print product labels dynamically.
  • Retail โ€“ Generate barcode labels for inventory.

Table of Contents

  • OpenLabel
  • Project Description
  • Table of Contents
    • Features
    • Installation
    • Usage
      • 1. Print a Label
      • 2. Scale a Label
      • 3. Use Templates
  • License
  • Acknowledgements

Features

  • Print ZPL Labels โ€“ Send ZPL commands to a Zebra printer over the network.
  • Scale Labels โ€“ Adjust ZPL code to fit different printer resolutions (DPI).
  • Template System โ€“ Replace placeholders with actual values and handle conditional statements inside ZPL templates.

Installation

dotnet add package OpenLabel

Usage

1. Print a Label

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

2. Scale a Label

You can scale a ZPL label to fit a specific printer resolution (DPI):

string scaledZPL = LabelScaler.ScaleZPL("^XA^FO50,50^FS^XZ", 203, 300);

3. Use Templates

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

Get Involved

  • Have ideas or feature requests? Open an issue or start a discussion!
  • Want to contribute? Fork the repo, submit PRs, and help improve OpenLabel!
  • Using OpenLabel? Let us know! Share your use case, report issues, or give feedback.
  • Spread the word! โญ Star the repo, share it on social media, and help grow the community!

Join us in making OpenLabel the best open-source ZPL tool!

License

This software is licensed under the MIT license

Acknowledgements

  • The code for the ZPL scaling was in large part possible with the work of:
    • isatufan
    • deexno
You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.