Printer driver for brother ptouch series printers, supporting a variable length labels.
Project description
inventree-ptouch-endless-plugin
A label printing plugin for InvenTree, which provides additional support for Brother PTouch series printers.
Notable Features
- Dynamic length labels, depending on the size of the content
- Pixel perfect rendering using a custom base template
- Automatic label width setting
- True length, the labels length will be nearly the requested template width (about ±0.5mm which is a hardware limitation)
Template examples
Basic example
The generated pdf will cover the printable of the label exactly, one px in css is a actual pixel on the label, enabling consistant 1px features like a 1px border.
The Height [mm] from the template settings will determine the tape width (has to match what is in the machine) and the Width [mm] will determine its length. The printable area will be a bit smaller, as there the printers have a inherant margin on all sides.
{% extends "label/ptouch_base.html" %}
{% block style %}
.border {
width: {{ width_px }}px;
height: {{ height_px }}px;
border: 1px solid black;
box-sizing: border-box;
}
{% endblock style %}
{% block content %}
<div class="border">
Hello World!
</div>
{% endblock content %}
Dynamic Width
By including {% shrink_if_possible %} in your {% block content %} the printer driver will cut of any whitespace to the right of the label,
resulting in a label with a variable width depending on the content. The Width [mm] from the template settings is the max width in that scenario.
{% extends "label/ptouch_base.html" %}
{% load ptouch %}
{% block content %}
{% shrink_if_possible %}
Hello World!
{% endblock content %}
Supported printers
The plugin is based on labelprinterkit which supports the following printers:
- P700
- P750W
- H500
- E500
- E550W
The plugin has only been tested with a P750W.
The build in margins have been measured from labels printed by the P750W, if they dont fit other printers, provide me with better values through a issue or PR.
Other printers of the PTouch series might also work, but this is purly a suspicion.
Minimum Requirements
This plugin now requires the InvenTree version 1.1.0 or newer.
The plugin might function correctly on an InvenTree instance below version 1.1.0, but this has not been tested.
labelprinterkit
This plugin contains parts of https://github.com/ogelpre/labelprinterkit. Which could not be included via a dependency due to version conflicts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inventree_ptouch_endless_plugin-0.1.0.tar.gz.
File metadata
- Download URL: inventree_ptouch_endless_plugin-0.1.0.tar.gz
- Upload date:
- Size: 35.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
752ae21beeaa53c44b1445e3490603f7d8211a27360da6ad38fbb2ce49027674
|
|
| MD5 |
64db758ff22fa5f5b6d26427e5dd9597
|
|
| BLAKE2b-256 |
eb1b011dd7a3e68b7ae9fc4f6f944d8a27a6c0d19c0bca0e75134983e1bf69c5
|
File details
Details for the file inventree_ptouch_endless_plugin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: inventree_ptouch_endless_plugin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 46.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
469b6c069fc1e22db66ea21a9bfcfc36888c9ae61042b578b00caeb864f35270
|
|
| MD5 |
0efa6344a230b8049bda0d664726f650
|
|
| BLAKE2b-256 |
7a3f16ef4396d8cb1436570eb8a2160aa9bea5f37ab38e51b8cd3a0d9d3a2e6f
|