A Python GUI application that generates QR codes and automatically prints labels to your Zebra ZT510 printer.
- GUI Interface: Clean Tkinter interface with form inputs
- QR Code Generation: Uses web API for reliable QR code generation
- Automatic Printing: Multiple printing methods with automatic fallbacks
- Label Configuration: Prefix, starting number, quantity, and description
- Real-time Preview: See QR codes before printing
- ZPL Code Display: Review generated ZPL code
- Progress Tracking: Visual progress bar and status updates
# Double-click this file:
run.bat# Install dependencies
pip install -r requirements.txt
# Run the application
python qr_printer.py-
Configure Labels:
- Enter prefix (e.g., "ITEM")
- Set starting number (e.g., 1)
- Choose quantity (e.g., 5)
- Add description (optional)
-
Generate QR Code:
- Click "Generate QR Code" to see preview
- Test with sample buttons if needed
-
Print Labels:
- Click "Print Labels"
- Review ZPL code if desired
- Click "Yes" to print automatically
The application tries multiple printing methods automatically:
- Direct Network Printing: Connects to printer via socket (port 9100)
- Windows Copy Command: Uses
subprocessto execute copy command - File Save Fallback: Saves ZPL file and shows manual command
Default printer path: \\printserver\printer
You can change this in the "Printer Path" field to match your network printer.
- Size: 4" x 8" labels (printed in landscape orientation)
- Format: ZPL (Zebra Programming Language)
- Layout: Centered QR code and text for optimal appearance
- QR Code: High error correction for reliable scanning
- Text: Human-readable text below QR code
- Description: Optional static text at bottom of label
- Python 3.7+
- Windows (for network printing)
- Network access to Zebra ZT510 printer
requests: For web-based QR code generationtkinter: GUI framework (included with Python)
- Ensure printer is accessible on network
- Check printer path format:
\\hostname\sharename - Try manual copy command if auto-print fails
- Test with sample buttons (TEST123, ITEM-1, A-1)
- Check internet connection for QR generation
- Verify QR scanner can read generated codes
QR Gen/
├── qr_printer.py # Main application
├── requirements.txt # Python dependencies
├── run.bat # Quick start batch file
└── README.md # This file
- Run
run.bat - Set prefix to "PART"
- Set starting number to 100
- Set quantity to 10
- Add description "Widget Assembly"
- Click "Generate QR Code"
- Click "Print Labels"
- Click "Yes" to print
This will generate labels: PART-100, PART-101, PART-102, ..., PART-109