A Python-based script for printing labels with QR codes and images on three major operating systems: Linux, macOS, and Windows. This tool allows users to specify custom label sizes, generate QR codes, include images, and print directly to a label printer. In this particular project, the used label printer was a PM-241-BT from Phomemo like following image shows. This printer was purchased at Amazon. If you want to buy a printer to try this project, you can use one of the following links:
- Cross-Platform Compatibility: Works on
Linux,MacOS, andWindows. - Customizable Labels: Specify label dimensions (e.g., 50mm x 25mm).
- QR Code Generation: Dynamically generate and embed QR codes in labels.
- Images printing: Convert images to black & white format and add them to labels.
- Customizable printing script: Easy to customize python script to easily fit user needs.
- Python 3.7 or later.
PM-241-BTprinter from Phomemo or similar.- A working printer series driver setup installed for the respective operating system. Please check Phomemo's driver download page.
- To check for the
Linux/MacOSsetup preparation, please take a closer look on the following README file included in this repository. - To check for the
Windowssetup preparation, please take a closer look on the following README file included in this repository.
These setup guides cover driver installation, printer configuration, label size customization, and Python script execution to print your labels successfully. The following image shows the output label printed by executing one of both linux_mac_print.py or windows_print.py with labels with 50mm x 25mm size.
Feel free to contribute to this project by submitting issues or pull requests.
Thank contributors, organizations, or resources that supported the project:
- Acknowledge the ReportLab, qrcode and pillow libraries.
- Special acknowledge to Xelerate.tech team by providing all the necessary material and support to accomplish this project.

