Giter Site home page Giter Site logo

nelsontkq / zplify Goto Github PK

View Code? Open in Web Editor NEW
33.0 4.0 12.0 364 KB

Convert an image to a ZPL label parsable by a zebra printer

License: MIT License

Shell 1.98% C# 98.02%
csharp dotnet zebra-printer zebra zpl-programming-language zebra-label-printers zpl2 labelary zebra-printers zpl-language

zplify's Introduction

Zplify - Image to ZPL converter

Convert PNG, JPG, or any supported image type to ZPL for a Zebra printer.

Prints the ZPL directly to the console unless -o or --output is provided, then it will save the zpl to the target file.

Options

The full list of available options are as follows:

-l --length             Set the length of the label in pixels. 1200px is default.  
-w --width              Set the width of the label in pixels. 800px is default.  
-o --output             Set the output path. If omitted, the label will output to the terminal 
-i --interpolation-mode Set the interpolation mode. 1-7, default is 7
                        1=Low, 2=High, 3=Bilinear, 4=Bicubic 5=NearestNeighbor 6=HighQualityBilinear 7=HighQualityBicubic
-h --help               Display this message  

Example usage

# send directly to zebra printer
./zplify ./path/to/file.png | lpr
# save to output.zpl and resize.
./zplify ./path/to/file.png -o output.zpl -l 1800 -w 800
# pipe input from URL, convert to ZPL and send to printer
wget -O www.example.com/label.png | ./zplify | lpr -P printer_name

System requirements

Requires .net 5 runtime.

macOS

App requires libgdiplus. You can install with brew:

brew install mono-libgdiplus

zplify's People

Contributors

nelsontkq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zplify's Issues

Converting UPS Labels

Hi Nelson,
Have you tried converting UPS labels (either .gif or .png) using this code? It produces a ZPL output but it doesn't appear to be valid. Trying to render it on laberly.com returns the following:

"ERROR: you requested the 1st label, but the specified ZPL doesn't generate any labels"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.