NiimPrintX is a Python library designed to seamlessly interface with NiimBot label printers via Bluetooth. It provides both a Command-Line Interface (CLI) and a Graphical User Interface (GUI) for users to design and print labels efficiently.
- Cross-Platform Compatibility: NiimPrintX works on Windows, macOS, and Linux, ensuring broad usability.
- Bluetooth Connectivity: Effortlessly connect to your NiimBot label printers via Bluetooth.
- Comprehensive Model Support: Compatible with multiple NiimBot printer models (D11, B21, B1, D110, B18).
- Dual Interface Options: Provides both Command-Line Interface (CLI) and Graphical User Interface (GUI) to suit different user preferences.
- Custom Label Design: The GUI app enables users to design labels tailored to specific devices and label sizes.
- Advanced Print Settings: Customize print density, quantity, and image rotation for precise label printing.
To run NiimPrintX, you need to have the following installed:
- Python 3.12 or later
- ImageMagick library
- Poetry for dependency management
To install NiimPrintX, follow these steps:
- Ensure that ImageMagick is installed and properly configured on your system. You can download it from here.
Clone the repository:
git clone https://github.com/labbots/NiimPrintX.git
cd NiimPrintX
Install the necessary dependencies using Poetry:
python -m venv venv
poetry install
MacOS specific setup for local development
brew install libffi
brew install glib gobject-introspection cairo pkg-config
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export CFLAGS="-I/usr/local/opt/libffi/include"
NiimPrintX provides both CLI and GUI applications to use the printer.
The CLI allows you to print images and get information about the printer models.
Usage: python -m NiimPrintX.cli [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbose Enable verbose logging
-h, --help Show this message and exit.
Commands:
info
print
Usage: python -m NiimPrintX.cli print [OPTIONS]
Options:
-m, --model [b1|b18|b21|d11|d110]
Niimbot printer model [default: d110]
-d, --density INTEGER RANGE Print density [default: 3; 1<=x<=5]
-n, --quantity INTEGER Print quantity [default: 1]
-r, --rotate [0|90|180|270] Image rotation (clockwise) [default: 0]
--vo INTEGER Vertical offset in pixels [default: 0]
--ho INTEGER Horizontal offset in pixels [default: 0]
-i, --image PATH Image path [required]
-h, --help Show this message and exit.
Example:
python -m NiimPrintX.cli print -m d110 -d 3 -n 1 -r 90 -i path/to/image.png
Usage: python -m NiimPrintX.cli info [OPTIONS]
Options:
-m, --model [b1|b18|b21|d11|d110]
Niimbot printer model [default: d110]
-h, --help Show this message and exit.
Example:
python -m NiimPrintX.cli info -m d110
The GUI application allows users to design labels based on the label device and label size. Simply run the GUI application:
python -m NiimPrintX.ui
Contributions are welcome! Please fork the repository and submit a pull request with your improvements.
- Icons made by Dave Gandy from www.flaticon.com
- Icons made by Pixel perfect from www.flaticon.com
- Icons made by Freepik from www.flaticon.com
- Icons made by rddrt from www.flaticon.com
- Icons made by Icongeek26 from www.flaticon.com
- Icons made by SyafriStudio from www.flaticon.com
- Icons made by Wahyu Adam from www.flaticon.com
- Icons made by meaicon from www.flaticon.com
- Icons made by IconKanan from www.flaticon.com
- Icons made by kornkun from www.flaticon.com
- Icons made by Rifaldi Ridha Aisy from www.flaticon.com