Skip to content

Syfaro/zpl-printer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zpl-printer

A web tool for easily templating and printing ZPL over HTTP. Heavily inspired by zpl-rest.

It utilizes the Tera template engine to construct ZPL.

Usage

Build with cargo. It depends on PostgreSQL to store data, set the DATABASE_URL environment variable before running. The web UI available on port 3000 allows configuring printers, label sizes, and labels.

The playground allows quick iteration of label design thanks to the label preview service provided by Labelary.

Labels can be saved and then printed via API.

API

POST /api/v1/print

Prints a label. It requires a JSON-encoded body with the following contents:

{
    "printer_id": "", // The printer's ID
    "label_id": "",   // The label's ID
    "data": {}        // Arbitrary key-value data passed to label's template
}

About

Web interface for ZPL templating and printing

Resources

Stars

Watchers

Forks

Packages