- Remove build artifacts from git tracking (build/, dist/, __pycache__/, *.spec) - Updated .gitignore to properly exclude generated files - Added old_code/ documentation folder - Updated sample_data.txt to show new 5-field format - Exclude user-specific conf/app.conf from tracking
4.1 KiB
Adaptronic Label Printer
Thermal label printing application with customizable SVG templates for 35mm x 25mm labels.
Features
- 🎨 Customizable Layouts - SVG template system for flexible label design
- 📄 High-Quality PDFs - 1200 DPI output with automatic backup
- 🖨️ Silent Printing - SumatraPDF integration for automatic printing
- 📊 Variable Support - Dynamic text replacement ({Article}, {NrArt}, {Serial})
- 💾 Automatic Backup - All labels saved to pdf_backup/ with timestamps
- 🔍 File Monitoring - Watches check.txt for automatic label generation
Quick Start
Install Dependencies
# Activate virtual environment
venv\Scripts\activate
# Install requirements
pip install -r requirements_gui.txt
Run the Application
python label_printer_gui.py
Label Specifications
- Size: 35mm × 25mm (landscape)
- Format: Thermal labels (Citizen CTS-310, Zebra ZD420/ZD421)
- Template:
conf/label_template.svg - Data Format: Semicolon-separated (COMANDA;NR_ART;SERIAL)
File Structure
adaptronic_label-printer/
├── label_printer_gui.py # Main GUI application
├── print_label.py # Printing logic
├── print_label_pdf.py # PDF generation with SVG support
├── requirements_gui.txt # Dependencies
├── conf/
│ ├── label_template.svg # Customizable label layout
│ └── app.conf # Application settings
├── pdf_backup/ # Auto-saved label PDFs
├── logs/ # Print logs
└── old_code/ # Legacy scripts (archived)
Customizing Labels
Edit conf/label_template.svg to change the layout. Use these variables:
{Article}- Article/Command number{NrArt}- Article number{Serial}- Serial number
After editing the SVG, labels will automatically use the new layout.
Printing
Silent Printing (Recommended)
Labels print automatically using SumatraPDF. No dialogs or manual steps required.
SumatraPDF Locations Checked:
- Bundled with exe (for deployments)
SumatraPDF/folder in project directory- System installations (
C:\Program Files\SumatraPDF\)
PDF Printer Testing
Select "Microsoft Print to PDF" or similar PDF printer to test label generation without physical printing.
Printer Configuration
For thermal printers, configure in Windows Printer Preferences:
- Media Type: LABELS (enables gap sensor)
- Paper Size: 35mm x 25mm or Custom
- Orientation: Landscape
- Darkness: 10-15 (medium)
- Speed: Medium (4-6 in/sec)
Dependencies
Core:
reportlab- PDF generationsvglib- SVG to PDF conversioncairosvg- Alternative SVG rendererwatchdog- File monitoring
GUI:
kivy- Cross-platform interface
Optional:
pywin32- Windows printer enumerationpycups- Linux printing support
Troubleshooting
Labels Print on Continuous Roll
Cause: Printer Media Type set to "Continuous" instead of "LABELS"
Fix: Change to "LABELS" in printer preferences
Dotted or Pixelated Text
Cause: Low darkness setting or draft mode
Fix: Increase darkness to 12-15, ensure quality mode enabled
PDF Not Printing Automatically
Cause: SumatraPDF not found
Fix: Install SumatraPDF or place in project folder
Technical Details
PDF Generation
- Resolution: 1200 DPI
- Compression: None (maximum quality)
- Font Size: 8pt (optimized for 35mm labels)
- Format: ReportLab with SVG embedding
Print Workflow
- Monitor
C:\Users\Public\Documents\check.txtfor changes - Parse semicolon-separated data
- Replace variables in SVG template
- Convert to high-quality PDF (35mm × 25mm)
- Auto-save to
pdf_backup/ - Silent print via SumatraPDF
Building Executable
python build_exe.py
Output: dist/LabelPrinter.exe
Support
- Tested on Windows 10/11
- Compatible with Citizen CTS-310, Zebra ZD420/ZD421
- Based on proven label printer architecture
Status: Production Ready ✅
Last Updated: February 2026