This is a web service to print labels on (label) printers exposed via CUPS. Based on, but heavily modified from Brother_QL_Web.
Primarily, I use this in conjunction with Grocy for label printing, so there are some features that are built with that tool in mind, but the intent is to make this flexible and useful in other scenarios.
If not using the docker container, you need Python 3 for this software to work.
The web interface is responsive. There's also a screenshot showing how it looks on a smartphone
services:
label_web:
image: cvergaray/label_web_2:latest
container_name: label_web
ports:
- 8013:8013
volumes:
- <Your Local Path>/Label_Config:/appconfig
- <Your Local Path>/label_plugins:/app/elements/CustomConfiguration can be done via the UI (recommended) or by editing the config file directly. Details are provided in the Configuration Documentation, with a description of each configuration property in the Configuration Sections document.
- Start the container (or run the app locally) and open http://localhost:8013.
- Go to Settings and adjust server, CUPS, printers, labels, and website options.
- Click Save All Settings. The app writes
config.jsonfor you underLabel_Config.
If you prefer to edit files directly or are scripting installs:
- Copy
config.example.jsonto<Your Local Path>/Label_Config/config.json. - Edit the values to match your environment. See the Configuration Section for details.
- Add any template (
.lbl) files to the sameLabel_Configfolder. - Add any custom element plugins to
Label_Config/label_plugins. See the
Comprehensive documentation is available in the docs/ folder:
- Template File Elements Documentation - Complete reference for all template elements, form field customization, and data handling
- Minimal Configuration Guide - Quick start guide for configuration with minimal required settings
- Custom Label Sizes Guide - Instructions for configuring custom label sizes for your printers
- Manual Installation Guide - Step-by-step guide for installing without Docker
- Plugin Development Guide - Guide for developing custom element plugins
Labels are defined in template files. The templates are specific to how you want the label to look, which depends on the printer/media available and what data you would like on the label. An in-depth description of the label template elements can be found in the Template File Elements Documentation.
Once it's running, access the web interface by opening the page with your browser.
If you run it on your local machine, go to http://localhost:8013 (You can change
the default port 8013 by remapping in the docker-compose file or using the --port argument if not using docker).
You will then be forwarded by default to the interactive web gui located at /labeldesigner.
All in all, the web server offers:
- a Web GUI allowing you to print your labels at
/labeldesigner, - an API at
/api/print/text?text=Your_Text&font_size=100&font_family=Minion%20Pro%20(%20Semibold%20)to print a label containing 'Your Text' with the specified font properties. - an API at
/api/print/template/your_template_file_name.lblto print labels using a label template found at your_template_file_name.lbl - a Web GUI for selecting and printing label templates.
- Support any CUPS printer instead of only Brother QL Printers
- Select from any shared printer on the CUPS server
- Automatically resize text to fit the label
- Print Quantity (printing multiple labels at a time)
- Label Template support (e.g. Configure a Grocy label without code changes)
- Containerized for ease of deployment
- Created Plugin Architecture for visual elements
- GUI for printing template files from web UI
- GUI for Creating/Editing template files from Web UI
These plugins are built-in, but please feel free to request additional ones or develop your own!
- Rendering:
- Text
- Datamatrix
- Image File
- Image URL
- Over 100 Code Types (Code39, Code12 QR Code etc. https://github.com/bwipp/postscriptbarcode/wiki/Symbologies-Reference)
- Line
- Rectangle
- Circle
- Non-Rendering:
- Data Array Index
- Data Dict Item
- GROCY Entry
- JSON API
- JSON Payload
- Layout Helpers (Center, Stack Layout, Etc.)
This software is published under the terms of the GPLv3, see the LICENSE file in the repository.
Parts of this package are redistributed software products from 3rd parties. They are subject to different licenses:
- Bootstrap, MIT License
- Glyphicons, MIT License (as part of Bootstrap 3.3)
- jQuery, MIT License
- treepoem, MIT License
- Ghostscript, AGPL/GPL
Plugin architecture based on example code provided by GitHub user Victor Dorneau
