A simple, modern Windows application for printing Code128 barcodes to any connected printer. Features a clean GUI with dark/light theme support, real-time barcode preview, and print history tracking.
- Universal Printer Support - Works with any Windows printer (thermal, laser, inkjet)
- Real-time Preview - See your barcode before printing
- Print History - Automatic tracking of all printed barcodes with reprint functionality
- Dark/Light Theme - Modern UI with theme switching
- Batch Printing - Print multiple copies at once
- Barcode Caching - Fast performance with intelligent image caching
- HiDPI Support - Crisp display on high-resolution screens
- Persistent Settings - Remembers your printer selection and window size
The easiest way to get started is to download the pre-built installer directly from the Releases page. Run LegacyBarcodePrinter_Setup.exe and follow the prompts — no Python required.
- Clone this repository:
git clone https://github.com/dannyphamv/barcode-printer.git
cd barcode-printer- Install dependencies:
pip install -r requirements.txt- Run the application:
python barcode_printer.pypyinstaller --onedir --windowed --noconsole --name="LegacyBarcodePrinter" --add-data="package_color.png:." --icon="favicon.ico" --collect-all=PIL --collect-all=barcode --collect-all=sv_ttk --collect-all=pywinstyles --hidden-import=win32print --hidden-import=win32ui --hidden-import=win32con --hidden-import=win32api barcode_printer.py- Select a Printer - Choose your printer from the dropdown menu
- Enter Barcode - Type or scan a barcode value
- Preview - The barcode preview updates automatically
- Set Copies - Choose how many copies to print (default: 1)
- Print - Click the Print button or press Enter
- Reprint - Select items from history and click "Reprint Selected"
- Barcode Format: Code128 (supports alphanumeric characters)
- Label Size: 600x300 pixels (automatically scaled to printer)
- GUI Framework: Tkinter with sv-ttk theme
- Printing: Windows GDI via pywin32
- Image Processing: Pillow (PIL)
- Caching: LRU cache with 100-item limit for barcode images
sv-ttk- Modern theme for TkinterPillow- Image processingpython-barcode- Barcode generationpywin32- Windows printing APIpywinstyles- Windows 10/11 title bar themingpyinstaller- Packaging the application as EXE
See requirements.txt for specific versions.
This project is licensed under the MIT License - see the LICENSE.txt file for details.
